
My laptop has no windows key, so for the past year or so I've just been using alt as mod, and dealing with the fact that I can't use some shortcuts involving alt in various applications (emacs, irssi, etc.). Then just today I realized that I can map my left and right alt keys separately! So I mapped left alt to Mod3 and use that as my mod key, and the right alt key went on happily being good old alt. Now I can once again use all those alt shortcuts. Now I also feel dumb. So I thought I would share just in case anyone else hasn't figured this out either. =) -Brent

Brent Yorgey wrote: ...
separately! So I mapped left alt to Mod3 and use that as my mod key, and the right alt key went on happily being good old alt. Now I can once again use all those alt shortcuts. ...
I've got things set up the other way around. I use right alt as Mod3 and left alt as an ordinary alt key. Here's my .xmodmaprc file in case anyone's interested: $ cat ~/.xmodmaprc ! Change Right-Alt into Mod3 for use with xmonad remove Mod1 = Alt_R add Mod3 = Alt_R Took me a while to figure out that I had to remove Mod1 before adding Mod3 to get it to work properly. Stacey.

On Sun, Jun 07, 2009 at 03:20:19PM -0400, Brent Yorgey wrote:
My laptop has no windows key, so for the past year or so I've just been using alt as mod, and dealing with the fact that I can't use some shortcuts involving alt in various applications (emacs, irssi, etc.). Then just today I realized that I can map my left and right alt keys separately! So I mapped left alt to Mod3 and use that as my mod key, and the right alt key went on happily being good old alt. Now I can once again use all those alt shortcuts.
Now I also feel dumb. So I thought I would share just in case anyone else hasn't figured this out either. =)
my clicky old ibm model m has no windows key, so I mapped the caps-lock as mod leaving me with no collisions with the alt key. Plus I have no caps-lock key anymore avoiding the tYPICAL pROBLEM tHERE. I liked it so much that now all my keyboards are mapped that way :) A

On Sun, Jun 07, 2009 at 07:31:07PM -0700, Andrew Sackville-West wrote:
On Sun, Jun 07, 2009 at 03:20:19PM -0400, Brent Yorgey wrote:
My laptop has no windows key, so for the past year or so I've just been using alt as mod, and dealing with the fact that I can't use some shortcuts involving alt in various applications (emacs, irssi, etc.). Then just today I realized that I can map my left and right alt keys separately! So I mapped left alt to Mod3 and use that as my mod key, and the right alt key went on happily being good old alt. Now I can once again use all those alt shortcuts.
Now I also feel dumb. So I thought I would share just in case anyone else hasn't figured this out either. =)
my clicky old ibm model m has no windows key, so I mapped the caps-lock as mod leaving me with no collisions with the alt key. Plus I have no caps-lock key anymore avoiding the tYPICAL pROBLEM tHERE.
I liked it so much that now all my keyboards are mapped that way :)
A
This is a good idea, and I actually tried this a while ago, but there were some key combinations with caps-lock that my keyboard generated no events for. This is when I learned that in order to save space/materials/money, keyboards are constructed in such a way that there are quite a few key combinations between which the hardware can't tell the difference, since there is not a dedicated wire for each key. Anyway, I at least have caps-lock unmapped. =) -Brent

On Mon, Jun 08, 2009 at 04:10:58PM -0400, Brent Yorgey wrote:
On Sun, Jun 07, 2009 at 07:31:07PM -0700, Andrew Sackville-West wrote:
On Sun, Jun 07, 2009 at 03:20:19PM -0400, Brent Yorgey wrote:
My laptop has no windows key, [...] So I mapped left alt to Mod3 and use that as my mod key, and the right alt key went on happily being good old alt. Now I can once again use all those alt shortcuts. [...] my clicky old ibm model m has no windows key, so I mapped the caps-lock as mod leaving me with no collisions with the alt key. Plus I have no caps-lock key anymore avoiding the tYPICAL pROBLEM tHERE.
[...] This is a good idea, and I actually tried this a while ago, but there were some key combinations with caps-lock that my keyboard generated no events for. This is when I learned that in order to save space/materials/money, keyboards are constructed in such a way that there are quite a few key combinations between which the hardware can't tell the difference, since there is not a dedicated wire for each key.
I never cease to be amazed at these things. Who would have thought? I haven't found any such combinations yet, and hopefully I won't. I suspect not. back in '88 they probably wouldn't have thought to do that to a keyboard... I hope.
Anyway, I at least have caps-lock unmapped. =)
:) A

Andrew Sackville-West wrote:
On Mon, Jun 08, 2009 at 04:10:58PM -0400, Brent Yorgey wrote:
On Sun, Jun 07, 2009 at 07:31:07PM -0700, Andrew Sackville-West wrote:
On Sun, Jun 07, 2009 at 03:20:19PM -0400, Brent Yorgey wrote:
My laptop has no windows key,
[...]
So I mapped left alt to Mod3 and use that as my mod key, and the right alt key went on happily being good old alt. Now I can once again use all those alt shortcuts.
[...]
my clicky old ibm model m has no windows key, so I mapped the caps-lock as mod leaving me with no collisions with the alt key. Plus I have no caps-lock key anymore avoiding the tYPICAL pROBLEM tHERE.
[...]
This is a good idea, and I actually tried this a while ago, but there were some key combinations with caps-lock that my keyboard generated no events for. This is when I learned that in order to save space/materials/money, keyboards are constructed in such a way that there are quite a few key combinations between which the hardware can't tell the difference, since there is not a dedicated wire for each key.
I never cease to be amazed at these things. Who would have thought? I haven't found any such combinations yet, and hopefully I won't. I suspect not. back in '88 they probably wouldn't have thought to do that to a keyboard... I hope.
Now that everybody is talking about their keyboard remapping experience... ;) I use the classic Dvorák layout. The one where the numerical part of the keyboard reads 7 5 3 1 9 0 2 4 6 8 where the 7 starts, where the 2 is on a QWERTY. So that leaves two keys on the left of the 7 and one key to the right. So, I mapped the QWERTY-1 to Super_L which I use as my modifying key in Xmonad. This way I don't have to reach *down* to control the WM but *up*, which is so much more convenient. Especially when switching workspaces :) I also mapped Tap -> Alt and Caps-Lock -> Control. Good for emacsen. Happy Hacking, Thomas PS. If u want to try it out, put the attached file in the folder with your X11-keymaps (e.g. on a Ubuntu this would be /etc/X11/xkb/symbols/, or on a Arch Linux, /usr/share/X11/xkb/symbols/), and change the keyboard layout in your xorg.conf to "dvorakx" :D // Dvorak X Adaption by Thomas Friedrich (www.suud.de) // X = Vim, Emacs, LaTeX, Lisp, Xmonad // To use this keymap, use a 105-key-keyboard and change // your xorg.conf to // // Section "InputDevice" // Identifier "Generic Keyboard" // Driver "kbd" // Option "XkbRules" "xorg" // Option "XkbModel" "pc105" // Option "XkbLayout" "dvorakx" // EndSection // partial alphanumeric_keys xkb_symbols "dvorak-gell" { name[Group1]= "Dvorak GELL Adaption"; // Alphanumeric section key <ESC> { [ Caps_Lock ] }; // Keyboard row number: +2 key <TLDE> { [ Tab, ISO_Left_Tab, Tab, ISO_Left_Tab ] }; key <AE01> { [ Super_L, Hyper_L, Super_L, Hyper_L ] }; key <AE02> { [ 7, trademark ] }; key <AE03> { [ 5, copyright ] }; key <AE04> { [ 3, registered ] }; key <AE05> { [ 1, section ] }; key <AE06> { [ 9, parenleft ] }; key <AE07> { [ 0, parenright ] }; key <AE08> { [ 2, EuroSign ] }; key <AE09> { [ 4, sterling ] }; key <AE10> { [ 6, dollar ] }; key <AE11> { [ 8, cent] }; key <AE12> { [ Escape, Escape, Escape, Escape ] }; // Keyboard row number: +1 key <TAB> { [ Alt_L, Meta_L, Alt_L, Meta_L ] }; key <AD01> { [ udiaeresis, Udiaeresis, bracketleft ] }; key <AD02> { [ comma, semicolon, plus ] }; key <AD03> { [ period, colon, dollar ] }; key <AD04> { [ p, P, bracketright ] }; key <AD05> { [ y, Y, slash ] }; key <AD06> { [ f, F, backslash ] }; key <AD07> { [ g, G, braceleft ] }; key <AD08> { [ c, C, backslash ] }; key <AD09> { [ r, R, dollar ] }; key <AD10> { [ l, L, braceright ] }; key <AD11> { [ apostrophe, quotedbl ] }; key <AD12> { [ question, exclam ] }; // Keyboard row number: 0 key <CAPS> { [ Control_L, Control_L ] }; key <AC01> { [ a, A, asciitilde, dead_tilde ] }; key <AC02> { [ o, O, less ] }; key <AC03> { [ e, E, minus ] }; key <AC04> { [ u, U, greater ] }; key <AC05> { [ i, I, parenleft ] }; key <AC06> { [ d, D, parenright ] }; key <AC07> { [ h, H, grave, dead_grave ] }; key <AC08> { [ t, T, ampersand ] }; key <AC09> { [ n, N, acute, dead_acute ] }; key <AC10> { [ s, S, at ] }; key <AC11> { [ ssharp, slash ] }; key <BKSL> { [ minus, underscore, bar, brokenbar ] }; // Keyboard row number: -1 key <LSGT> { [ adiaeresis, Adiaeresis, bar, brokenbar ] }; key <AB01> { [ odiaeresis, Odiaeresis, asciicircum, dead_circumflex ] }; key <AB02> { [ q, Q, colon ] }; key <AB03> { [ j, J, equal ] }; key <AB04> { [ k, K, asterisk ] }; key <AB05> { [ x, X ] }; key <AB06> { [ b, B ] }; key <AB07> { [ m, M, numbersign ] }; key <AB08> { [ w, W, percent ] }; key <AB09> { [ v, V, degree ] }; key <AB10> { [ z, Z, section ] }; // Keyboard row number: -2 key <LCTL> { [ Caps_Lock ] }; key <SPCE> { [ space, Escape, space, Escape ] }; include "level3(ralt_switch)" };

On Mon, Jun 08, 2009 at 11:12:18PM -0700, Andrew Sackville-West wrote:
On Mon, Jun 08, 2009 at 04:10:58PM -0400, Brent Yorgey wrote:
This is a good idea, and I actually tried this a while ago, but there were some key combinations with caps-lock that my keyboard generated no events for. This is when I learned that in order to save space/materials/money, keyboards are constructed in such a way that there are quite a few key combinations between which the hardware can't tell the difference, since there is not a dedicated wire for each key.
I never cease to be amazed at these things. Who would have thought? I haven't found any such combinations yet, and hopefully I won't. I suspect not. back in '88 they probably wouldn't have thought to do that to a keyboard... I hope.
Ouch, I was wrong. I don't get ctrl-. (and maybe others) on this keyboard, it appears. In emacs, the key binding C-c C-. gets recognized as C-c . and further xev reports no difference between a '.' and 'C-.' :(. I tried it in a VT and it was even worse. 'C-.' did *nothing* at all... :( I wonder if that's a keyboard issue or some other issue in the keymaps. A

Andrew Sackville-West
back in '88 they probably wouldn't have thought to do that to a keyboard... I hope.
My 1987-vintage IBM Model M keyboard doesn't respond to Caps Lock +
shift + 2 (or W, S or X; any other key is fine). My solution is to use
workspace 2 for something I'm unlikely to want to move windows to -- and
have a different key bound just in case I *do* need to...
--
Adam Sampson
participants (5)
-
Adam Sampson
-
Andrew Sackville-West
-
Brent Yorgey
-
Stacey Sheldon
-
Thomas Friedrich