Page 1 of 1
Using any key as Meta, Super, Hyper, etc.
Posted: 17 Jul 2012, 15:52
by TacticalCoder
I must admit I'm a bit ashamed to ask such a noob question but...
On a keyboard, can you use any key as a modifier key? And any modifier key as a "regular" key?
For example, say I decide to buy a japanese HHKB Pro 2 or a japanese IBM Model M, can I configure all the keys left and right of the space bar (there are many on japanese keyboards ; ) to act as Meta, Super, Hyper on the good old Symbolics keyboard? (hey Webwit btw if you have too many Symbolics keyboards my birthday is in January ; )
I did play a bit on my Linux system 'just for fun' and, for example, I changed the 'end' key so that it acts as caps_lock (and hence triggers the led on and off too):
xmodmap -e 'keycode 103 = Caps_Lock'
xmodmap -e 'add lock = Caps_Lock'
And it works.
But I'm still confused.
Basically: are all the keys "just the same" and it's just conventions that make modifier keys modifier keys or is there more to it?
Posted: 17 Jul 2012, 17:46
by Kurk
I'm not a *nix user so I don't know about the software side. Concerning the keyboard hardware, there are two things I am aware of:
1) The pause/break key does only send a make code and no break code in most (if not all) scan code sets.
2) The modifier keys of non-NKRO boards have special matrix positions or their own matrices so they can be pressed simultaneously with two other keys. Take for instance a model M: it has only 2KRO but the combination CTRL-ALT-DEL is still registered.
Posted: 17 Jul 2012, 21:15
by woody
Kurrk wrote:1) The pause/break key does only send a make code and no break code in most (if not all) scan code sets.
Except with USB connection, where it is a regular key.
TacticalCoder wrote:On a keyboard, can you use any key as a modifier key? And any modifier key as a "regular" key?
Bar the exception above and the KRO limits Kurrk mentioned, yes.
For example, say I decide to buy a japanese HHKB Pro 2 or a japanese IBM Model M, can I configure all the keys left and right of the space bar (there are many on japanese keyboards ; ) to act as Meta, Super, Hyper on the good old Symbolics keyboard?
I had similar thought once. What is important is that HHKB JP does not do some fancy mangling of combos.
If I were you, I'd seek somebody in possession of HHKB JP and ask him to do some tests.
Basically: are all the keys "just the same" and it's just conventions that make modifier keys modifier keys or is there more to it?
Just a convention.
Posted: 17 Jul 2012, 22:05
by Djuzuh
Only the FN key can not be displaced with software modifications.
Posted: 18 Jul 2012, 02:01
by TacticalCoder
Thanks all for the explanation...
woody wrote:I had similar thought once.
eh eh
Well I take it you're right: I should find someone who has a .jp version of the HHKB and knows Linux a bit and ask him if it could work.
That said damn Model Ms and their 2-KRO: but even in that case it could still be useful as long as I don't rely on crazy
Hyper + Super + whatever-key combo

Posted: 18 Jul 2012, 06:14
by bebuxe
>Djuzuh
With Xorg, Fn is programmable (though unnecessary most time). So much so you can Map your own layers, over layers, with your own method of inputing other values. If you know of the compose key, or as X calls it multi_key, you would know how near to infinite you can make your Layouts.
Ideally, I want to test On/Off States for Input Modification than Rolling State Changes (I leave rolling for input like in "asdf"), i.e. Caps Lock vs Shift+key, unlike dead keys. But as a question if I use the Super key, windows, yes I do on the only viable Window Manager the company I work for provided me that is Programmable and Dynamic, the awesome wm:
http://awesome.naquadah.org
http://en.wikipedia.org/wiki/Awesome_WM
http://www.youtube.com/watch?v=TgEIac3rcYI
But enough about me, What are you trying to do with your KB layout?
If you like to learn more about Xorg:
http://www.x.org/releases/current/doc/x ... onfig.html
https://wiki.archlinux.org/index.php/Xmodmap
https://wiki.archlinux.org/index.php/KEYMAP
And there's TOO much more that even I have not finished reading. All in all, in anything you can install Xorg, you can change layout of the keyboard.
PS
I am a fledgling as well.
Posted: 18 Jul 2012, 08:45
by Djuzuh
bebuxe wrote:>Djuzuh
With Xorg, Fn is programmable (though unnecessary most time). So much so you can Map your own layers, over layers, with your own method of inputing other values. If you know of the compose key, or as X calls it multi_key, you would know how near to infinite you can make your Layouts.
Ideally, I want to test On/Off States for Input Modification than Rolling State Changes (I leave rolling for input like in "asdf"), i.e. Caps Lock vs Shift+key, unlike dead keys. But as a question if I use the Super key, windows, yes I do on the only viable Window Manager the company I work for provided me that is Programmable and Dynamic, the awesome wm:
http://awesome.naquadah.org
http://en.wikipedia.org/wiki/Awesome_WM
http://www.youtube.com/watch?v=TgEIac3rcYI
But enough about me, What are you trying to do with your KB layout?
If you like to learn more about Xorg:
http://www.x.org/releases/current/doc/x ... onfig.html
https://wiki.archlinux.org/index.php/Xmodmap
https://wiki.archlinux.org/index.php/KEYMAP
And there's TOO much more that even I have not finished reading. All in all, in anything you can install Xorg, you can change layout of the keyboard.
PS
I am a fledgling as well.
I'm pretty sure that when you press FN, no keyboard code is sent to the PC.
So how do you want to modify it?
Posted: 18 Jul 2012, 09:01
by bebuxe
>Djuzuh
Here are some sample ones:
https://wiki.archlinux.org/index.php/Ex ... ys_in_Xorg
http://www.thinkwiki.org/wiki/How_to_ge ... ys_to_work
But you are correct. There is no actual hardware Fn that is programmable from Xorg, because the key is a firmware Switch Lock from the KB manufacturers that is not sent to OS. What is programmable is a key to be mapped as if it was the Fn or Switch Lock key in Xorg, for your Fav. Keys (volume up/down, Brightness, etc.)
Posted: 18 Jul 2012, 09:06
by Djuzuh
Yes obviously you can use a random key as FN

.
But you can't reassign the actual FN key ^^, that's what I was trying to say.
Posted: 18 Jul 2012, 09:09
by bebuxe
Then I apologize. You are correct. The only keys that can be assigned are those that xev can scan, or that the keyboard outputs to the OS, or in this case dbus or hald (or your own). *did not read it correctly*