3

I'm using a Cherry G80 (excellent 'clicky' keyboard btw.) on my Macbook Air. Everything works fine, I can use and remap all keys using Ukelele1 or directly in Emacs.

The only key behaving strange is the Context Menu2 Key.

It returns the same Unicode sequence as Control-P.

This is the output of Key Codes3 when pressing the Context Menu key:

Key Down
Characters: 
Unicode:        16 / 0x10
Keys:       
Key Code:   110 / 0x6e
Modifiers:  256 / 0x100

This is the output for Control-P:

Key Down
Characters: 
Unicode:        16 / 0x10
Keys:       ⌃P
Key Code:   35 / 0x23
Modifiers:  262401 / 0x40101

(Notice the difference in 'Keys')

My goal is to use it directly in Emacs or be able to swap it to some other (modifier) key. Is there any way to do this? I can't find a way to bring Ukelele to do that.

  • 1
    You could probably use KeyRemap4MacBook to map it to another key. None of the questions here (1 2 3 4) mention any way to get an actual context menu key on OS X though. – Lri Jul 10 '12 at 17:48
5
+50

Bad news. Apple's XML DTD format that Ukelele targets does not support modifiers outside of shift keys, option keys, control keys, and command keys.

As @Lri suggested KeyRemap4MacBook supports mapping the Context Menu Key, which it calls the Application Key. In KeyRemap4MacBook's preferences go to For PC Users -> Change PC Application Key to see all the supported options. Mappings that may be of use for Emacs: Fn Key; Shift_L Key; Option_L Key; Control_L Key; and, Command_L Key.

  • Thanks for this explanation. KeyRemap4Macbook seems to be working. While I don't really like some application messing with my input, this is an acceptable solution! – jsadfeew Jul 16 '12 at 17:50
-2

The easiest way is to customize the key layout. You can do this by hand but I'd suggest using the utility Ukelele. I haven't used this on Lion so I don't know how well it works. If you want to do it manually (which I've done in the past as well) here's the tech note from Apple on how to do it.

  • 1
    Please read my question carefully. I can't figure out to make Ukelele do what I want. – jsadfeew Jul 6 '12 at 12:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .