I found ESC-prefix and Control-X-prefix defined in keymap.c:
initial_define_key (global_map, 033, "ESC-prefix");
initial_define_key (global_map, Ctl ('X'), "Control-X-prefix");
But no matter what I try I can't add a map for Super (Hyper) key.
And this isn't working
Lisp_Object s_map;
...
s_map = Fmake_keymap (Qnil);
Fset (intern_c_string ("s-map"), s_map);
Ffset (intern_c_string ("S-prefix"), s_map);
...
initial_define_key (global_map, 0xffeb, "S-prefix"); // tried many codes
...
initial_define_key (s_map, 'z', "my-function");
Nothing:
s-z is undefined
I also have a question what #define Ctl(c) ((c)&037)
does? Because 037 is no a key code of any Control (left or right).
Can you provide a working example of adding a key map to the source code?
--with-ns
: Qsuper /ns_command_modifier
/ns-command-modifier
innsterm.m
andns-win.el
. You might also try grepping for Qsuper and super_modifier inxterm.c
andw32fns.c
andglobals.h
I hope you are able to get some sleep eventually -- obsessions and sleep seldom mix. – lawlist Aug 28 '15 at 7:25super
andhyper
are two different keys. Not sure if you know it. – MatthewRock Aug 28 '15 at 8:18