Time passes quickly and I'm not really the blogger as it seems. Anyway!
I build my own ergo dox keyboard and wanted to have a "Hyper" modifier key for my emacs.
Since I couldn't figure out if there is a native key code for this I came up with following solutions.
Create a ~/.xmodmap with following content.
remove Control = Control_R keysym Control_R = Hyper_R clear Mod3 add Mod3 = Hyper_RThis will transform your right control key into a Hyper key which you can bind in emacs with H a.g. "(kbd "H-c")" is Hyper-c
Of course that isn't every ones preferred way. The xmodmap commands are pretty self explaining for this simple task
The "remove" removes the control_R key from the control modifiers. Then I link/overwrite Control_R with Hyper_R. Mod3 modifieres were empty on my Debian default xmodmap layout. Check yours with just running xmodmap without any argument. And finally add it the the modifiers list. There is no particular reason why I chose Mod3. As said it was empty and I didn't want to make a mess on my keyboard config.
'keysym' is the most important command. If you need the right control as it is you might choose any other key you want. F12 or Home for instance. I also chose Hyper_R because I had an already configured Hyper_L but I don't know where this should be on my keyboard.
Little side note. xev helps a lot to find out what a key does if you press it.
No comments:
Post a Comment