Announcement

Collapse
No announcement yet.

Changes in keyboard mapping with xkb have no effect

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Changes in keyboard mapping with xkb have no effect

    I'm trying to remap my ES Dvorak keyboard configuration to swap the 'h' and 'r' key positions. The original positions of the key map were a - o - e - u - i - d - r - t - n - s on the second row, and I want to set it to be a - o - e - u - i - d - h - t - n - s

    I modified the file /usr/share/X11/xkb/es file to do this, and after rebooting, on the ES Dvorak keyboard preview from the keyboard configuration, it appears that it's correctly modified, but actually, when I start to write, it's keeping the default key mapping (a - o - e - u - i - d - r - t - n - s).

    How can I force to use my custom keyboard mapping on an existing keyboard distribution?

    Sorry for my bad english

    #2
    See How can I remap keyboard keys? and scroll down a tad to answer 13.
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Snowhog's suggestion of using xmodmap might be a better option than modifying xkbmaps directly (since upgrades on xkb-data package will overwrite your modifications), but to answer your question: Your edits might not have any effect because xkb caches keymaps in /var/lib/xkb/...so you might be still using a cached map, solution being switching keymaps or even deleting/moving the cache files.

      But like I (and Snowhog) mentioned, using xmodmap might be a better long term solution.

      Just out of curiosity, you want to use Spanish dvorak (for Spanish letters I presume) but with the "normal" dvorak h/r positioning?

      Comment


        #4
        I use xmodmap (to invert my grave+tilde key and bar+backslash key) and it's simple. Plus, you can map individual users or the system depending on your needs.

        Open a terminal and type:

        xmodmap -pke

        This will print your key table. Note the keycode for "h" and "r". @here, it's 43 for "h" and 27 for "r".

        Code:
        ...
        keycode  27 = r R r R
        ...
        keycode  43 = h H h H
        ...
        Now, create a file to modify those keys:

        kate ~/.Xmodmap

        put lines like this in it:

        Code:
        keycode 27  =  h H h H
        keycode 43  =  r R r R
        and save. It should automatically take effect every time you log in. To test it right now, enter this command;

        xmodmap ~/.Xmodmap

        Here's my results:

        Before above change:

        stuart@office:~$ RED HAT red hat
        RED: command not found
        and after
        stuart@office:~$ HED RAT hed rat
        HED: command not found
        Last edited by oshunluvr; Feb 04, 2015, 12:24 PM.

        Please Read Me

        Comment

        Working...
        X