Re: [PLUG] Swapping key functions with .Xmodmap
On 2017-11-16 14:40:50, Rich Shepard wrote: > > Since the existing .Xmodmap has the remove commands (which I see in the > man page) I assume that they're needed for all keys being modified. > I don't think the remove commands are needed for anything except changing "special" keys, like Caps_Lock, Control, Shift, etc. The manpage only uses the "add" and "remove" keywords for changing Caps_Lock and Control, and even then only to add and remove the "lock" in Caps_Lock and the "control" in control. The actual keymappings themselves are changed with the keysym command. ! Swap Caps_Lock and Control_L ! remove Lock = Caps_Lock remove Control = Control_L keysym Control_L = Caps_Lock keysym Caps_Lock = Control_L add Lock = Caps_Lock add Control = Control_L The other examples given in the manpage don't use "add" or "remove" and simply remap the keys as-is. % xmodmap -e "keysym Multi_key = Multi_key Meta_L" % xmodmap -e "keysym Alt_L = Meta_L Alt_L" % xmodmap -e "keysym BackSpace = Delete" ! make shift-, be < and shift-. be > ! keysym comma = comma less keysym period = period greater The .xmodmap file I posted previously maps the additional keys on my keyboard to generate a space when pressed. I would be surprised if it didn't work for your keyboard as well, provided the proper keycodes were exchanged so that they map to the wanted keys on your own keyboard. If not, does running "xmodmap -verbose .xmodmap" provide any additional details? -- Bryan ___ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Swapping key functions with .Xmodmap
On Fri, 17 Nov 2017, Bryan Linton wrote: My .xmodmap is the following: remove Lock = Caps_Lock keysym Caps_Lock = Escape ! This maps the kanji-conversion keys to keycode 129 = space keycode 131 = space keycode 208 = space ! Map the yen key to backspace (or backslash/pipe) !keycode 133 = BackSpace keycode 133 = backslash bar My first suggestion would be to see if you can simply remap them without trying to use the "remove" keyword. If that doesn't work, I wonder if using the keycode xev gives you instead of the keysym is what xmodmap is expecting. Bryan, It has been working for years swapping caps_lock and ctrl. In the following line from xev, state 0x0, keycode 115 (keysym 0xffeb, Super_L), same_screen YES Here the keycode is 133 with keysym of "Super_L". Hopefully that gives an idea of where to start. If not, please report back to the list. Since the existing .Xmodmap has the remove commands (which I see in the man page) I assume that they're needed for all keys being modified. Thanks for your input, Rich ___ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug
Re: [PLUG] Swapping key functions with .Xmodmap
On 2017-11-16 08:06:18, Rich Shepard wrote: > > [...] > > I tried modifying my existing .Xmodmap which swaps the left CapsLock and > Ctrl keys by copying the remove and add sequence for Super_L and Alt_L. > Unfortuately, xmodmap did not like this: > > remove Lock = Caps_Lock > remove Control = Control_L > remove Super = Super_L > remove Alt = Alt_L > keysym Control_L = Caps_Lock > keysym Caps_Lock = Control_L > keysym Alt_L = Super_L > keysym Super_L = Alt_L > add Lock = Caps_Lock > add Control = Control_L > add Super = Super_L > add Alt = Alt_L > keysym Alt_L = Meta_L Alt_L > > I must have a syntax error that I don't recognize. A clue stick is needed. > Fair warning, I'm running OpenBSD and not Linux, but I'm in a similar situation. I have a Japanese keyboard, which means that the spacebar is about 2 inches long. I've mapped the specialized kanji conversion keys (one to the left, and two to the right) to function as the spacebar too. I've also remapped Caps_Lock to be Control, without bothering to remap Caps_Lock anywhere else. There are also a few other changes that are commented. You most likely won't want or need these. My .xmodmap is the following: remove Lock = Caps_Lock keysym Caps_Lock = Escape ! These are for the Thinkpad keys keycode 234 = XF86Back keycode 233 = XF86Forward ! This maps the kanji-conversion keys to keycode 129 = space keycode 131 = space keycode 208 = space ! Map the yen key to backspace (or backslash/pipe) !keycode 133 = BackSpace keycode 133 = backslash bar ! Map PrtScr to Compose keycode 111 = Multi_key My first suggestion would be to see if you can simply remap them without trying to use the "remove" keyword. If that doesn't work, I wonder if using the keycode xev gives you instead of the keysym is what xmodmap is expecting. In the following line from xev, state 0x0, keycode 115 (keysym 0xffeb, Super_L), same_screen YES Notice that the keycode for my left Windows key is 115, and the keysym is "Super_L". Hopefully that gives an idea of where to start. If not, please report back to the list. I hope this helps! -- Bryan ___ PLUG mailing list PLUG@pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug