The title may not be the exact description of my "wants", but I think it highlights the best possible (and universal) approach.
I have a regular keyboard. Then I have a small USB device with merely 4 buttons or keys on it. It is identified as a keyboard in
In any case, pressing keys on a small "keyboard" prints "a", "b", "c", "d" respectively, with correct key-codes and exactly the same ones my regular keyboard would print if I pressed those keys on it. Of course, I want very different key-codes from this small device -- preferably the ones that are hard to find on any other keyboard-like devices. Not something too fancy for now, but, say, for now: if instead of those letters I'd be getting back F17, F18, F19 and F20 that would satisfy me.
I read man for
It almost worked, actually, when I made this device print "fr" instead of "us" characters upon pressing the keys. This worked by trial and error: I figured out the necessary device number requried, so I could say "setxkbmap -device N ..." and the rest would apply only to this device, but not my main keyboard. However, French isn't exactly what I had in mind, nor is it particularly convenient when it comes to assigning keys for various purposes.
Does anyone have any specific instruction on how to achieve this simple goal? I had spent some considerable time on it and, I figured, asking now would be a good time to ask, because I cannot be obsessing over such an puny issue any longer.
Thank you.
I have a regular keyboard. Then I have a small USB device with merely 4 buttons or keys on it. It is identified as a keyboard in
/dev
both as kbd8
and ums3
- those appear to be the same devices or maybe buses. I do not know that subject very well.In any case, pressing keys on a small "keyboard" prints "a", "b", "c", "d" respectively, with correct key-codes and exactly the same ones my regular keyboard would print if I pressed those keys on it. Of course, I want very different key-codes from this small device -- preferably the ones that are hard to find on any other keyboard-like devices. Not something too fancy for now, but, say, for now: if instead of those letters I'd be getting back F17, F18, F19 and F20 that would satisfy me.
I read man for
setxkbmap
and experimented with layouts, symbols, etc. - and all I could find in the /usr/local/share/X11/xkb/
directory. I then tried constructing my own layouts, symbols... ah! Too much. And then, of course, attempting to assign it all to this particular device only.It almost worked, actually, when I made this device print "fr" instead of "us" characters upon pressing the keys. This worked by trial and error: I figured out the necessary device number requried, so I could say "setxkbmap -device N ..." and the rest would apply only to this device, but not my main keyboard. However, French isn't exactly what I had in mind, nor is it particularly convenient when it comes to assigning keys for various purposes.
Does anyone have any specific instruction on how to achieve this simple goal? I had spent some considerable time on it and, I figured, asking now would be a good time to ask, because I cannot be obsessing over such an puny issue any longer.
Thank you.