I'm continuing to use my ancient Northgate OmniKey Ultra keyboard, which has outlived a variety of computers I've owned over the past (more than) twenty years, although it is now connected through several adaptors. But, I can type, and it's simply better than any of the toy keyboards sitting in my closet unused. Its only drawback is that it has no "Windows" key - known by Linux users as the "Super" key, and this is used commonly in both operating systems and various applications.
I've made several attempts in the past to "map" the [Omni] key to serve that function, but have never been successful. The web is, of course, full of suggestions, most of which are outdated, or simply don't work, so I thought I'd give it another shot to see if anyone can tell me what I'm missing.
Here's the background: The alphabet keys are standard English, and there is a set of normal function keys to the left, a separate set of mappable function keys across the top (which default to acting like Shift+Function keys), and a normal navigation/numeric keypad on the far right.
Between the central alphabet keys section and the navigation/numeric keypad on the far right is a separate keypad which is only for navigation - thus the normal state of things is that NumLock is generally always ON. This is, in other words, a 105 key keyboard. The [Omni] key is located in the center of this latter cluster with the left and right arrows on its left and right respectively, and the up and down arrows above and below it respectively. This is the key I would like to reassign to the Windows/Super key.
I'm using 64 bit Ubuntu 14.04.3 LTS, which no longer uses xmodmap, having switched to xkb a few versions ago. None of the usual high-level or GUI methods of reassigning keys respond at all to the key; these include the stock 'System Settings > Keyboard' utility and the CompizConfig Settings Manager's 'Ubuntu Unity Plugin.'
The responses seem to indicate to me that the key simply isn't detected, implying (I think) that the issue needs to be addressed at a lower level.
Using the xev utility from the command line, I have confirmed that the operating system "sees" the key. This is the output of xev when the key is pressed and released:
KeyPress event, serial 37, synthetic NO, window 0x3c00001,
root 0x2c5, subw 0x3c00002, time 55775673, (16,47), root
1258,93),
state 0x0, keycode 120 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x3c00001,
root 0x2c5, subw 0x3c00002, time 55775817, (16,47), root
1258,93),
state 0x0, keycode 120 (keysym 0x0, NoSymbol), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
So, the keycode for the [Omni] key is 120, but "keysym" has a 0 value (Home, for instance, has a keycode of 110 and a keysym value of 0xff50).
Again, using the terminal command:
sudo dpkg-reconfigure keyboard-configurations
confirms that I am using the "Generic 105 key (Intl) PC" keyboard layout, just as I selected during installation (actually, it was auto-detected, but who am I to argue?) In the drop-down, I noticed that there was actually a separate entry for the Northgate keyboards; I played around with that for a bit, but that didn't seem to make any difference.
From what I could glean from various internet postings, the mappings for xkb are located under /usr/share/X11/xkb/, the subdirectories of which are geometry, symbols, and keycodes.
/usr/share/X11/xkb/geometry contains graphic instructions for drawing the keyboard on the screen, so this isn't it.
/usr/share/X11/xkb/symbols contains a list of mnemonics like the line:
key <AE03> { [ 3, numbersign ] };
showing the interpretation of [A]lphabet section, row [E] switch when unshifted (3) and shifted (#). Similarly, the line
key <BKSL> { [ backslash, bar ] };
shows the interpretation of BKSL when unshifted (\) and shifted (|).
Straightforward enough, but what I need is where the definition of the mnemonics are.
These seem to be in /usr/share/X11/xkb/keycodes.
/usr/share/X11/xkb/keycodes/xfree86 for example has lines like:
<LWIN> = 115;
<RWIN> = 116;
So it seemed that I could change those lines to:
<LWIN> = 120;
<RWIN> = 120;
and be done with it.
That had no effect at all, so I tried the same thing with /usr/share/X11/xkb/keycodes/evdev, which also had no effect. There are a number of other files under /usr/share/X11/xkb/keycodes, but many of them, even ibm, had no definition for Windows keys. So I suspect I may be barking up the wrong tree. This is reinforced by the fact that xev shows that the keycodes 115 and 116 (identified as <LWIN> and <RWIN> above) are returned when I press [End] and the down arrow respectively on the dedicated Navigation keypad. I suspect this might mean that I'm lost.
So I have a couple questions that I would love to have answers to if anyone can help:
1) Is this the right area in which to be exploring and, if not, where should I be looking?
2) Assuming this is the right area, is there some way to determine which of the files under /usr/share/X11/xkb/keycodes is actually being used?
3) Do changes to these files (such as the substitution of <LWIN> above need to be compiled or merged into some other binary somewhere and, if so, how?