I am using Programmer Dvorak keyboard layout. It binds the right alt key to Alt Gr (ISO_Level3_Shift).

How can I bind it back to right alt?

edit: I am using Debian GNU/Linux 8 (jessie) and LXDE.

In /usr/share/X11/xkb/symbols/us it says:

// Programmer Dvorak, by Roland Kaufmann <rlndkfmn at gmail dot com>
// License: BSD, available at <http://www.kaufmann.no/roland/dvorak/license.html>
partial alphanumeric_keys
xkb_symbols "dvp" {

    include "us(dvorak)"
    name[Group1] = "English (programmer Dvorak)";

    //[SNIP -- more keys here]

    // lower row, left side
    key <AB01> { [ apostrophe,      quotedbl,       dead_acute                  ] };
    key <AB07> { [ m,               M,              mu                          ], type[Group1] = "FOUR_LEVEL_ALPHABETIC" };

    include "level3(ralt_switch)"
  • did you download and install something from that site or did you follow the directions to use the existing us(dvp) (programmer dvorak) layout from your system XKB? what distribution and desktop are you using? as near as i can tell the dvp variant included in XKB v2.22 (current, on my Arch) does not hardcode the RAlt-is-AltGr option (level3:ralt_switch), so all we need to do is figure out how you've set that option and stop setting it. the us(dvp) layout is detailed in /usr/share/X11/xkb/symbols/us. – quixotic Dec 17 '17 at 23:45
  • Commenting out include "level3(ralt_switch)" and saving the change to /usr/share/X11/xkb/symbols/us and restarting solves this for me. Is there a better way for me to do this? – learninglinux Dec 18 '17 at 14:27

Official Jessie packages provide the XKB database in xkb-data v2.12 (source package xkeyboard-config). That hardcoded AltGr in us(dvp) was removed in this commit, which looks like it made it into v2.17. Currently the Debian Sid package is v2.19.

You've basically got two options to apply the fix yourself.

  1. Quick and dirty: Edit /usr/share/X11/xkb/symbols/us and comment out the line include "level3(ralt_switch)". Then reapply your keyboard layout (using setxkbmap, log out and back in, etc). The change should take effect immediately.

    • Advantage: should take all of 20 seconds to apply, including checking the manpage of setxkbmap.
    • Disadvantage: if the Jessie xkb-data package is updated to a new version (but less than v2.17), you'll have to perform the edit again.
  2. Slow and clean: Grab Sid's xkeyboard-config package (any other Debian version v2.17 or newer would work too) and create your own backport. Install any build dependencies, build the binary packages, and you'll have your very own Jessie version xkb-data v2.19. Install this package (with dpkg -i, or add to a local apt repository, etc), reload your keymap, and you're in business.

    • Advantage: if Jessie updates the xkb-data package, your local package should be kept if the new Jessie package is older than v2.19. Backporting software like this is safer than grabbing binary packages from other Debian distributions and installing them directly.
    • Disadvantage: other Jessie-era packages may have trouble with newer software. This is fairly low-risk for xkb-data, but it's something to keep in mind.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.