This is the old SliTaz forum - Please use the main forum.slitaz.org

How to change keyboard keys in slitaz?
  • slicelslicel March 2011
    How do you change, interchange, or re-assign keyboard keys in slitaz 3 stable xvesa?

    Switching the z and y keys is an example.

    Thank you
  • slicelslicel March 2011
    I am not asking about selecting keymaps.  I am asking about editing keys inside a keymap or whatever it is called.
  • mojomojo March 2011
    Open the kmap in text editor.
    On US pc102 keyboard for example:
    I look for which keycode = z
     keycode 21 = z
    I change to:
    #keycode 21 = z
    keycode 21 = y
    I look for the which keycode = y
    keycode 44 = y
    I change to :
    #keycode 44 = y
    keycode 44 = z

  • slicelslicel March 2011
    I cannot open /usr/share/kmap/*.kmap with a text editor.  There are many keyboard files and directories scattered in the filesystem that so far either do not open or edits to them have no effect.
  • mojomojo March 2011
    Install kbd-base.tazpkg
    This installs to /usr/share/kbd/keymaps/i386
    gunzip the keymap to read it.
    The us.map says it is combined with 4 include files :
    # us.map
    keymaps 0-2,4-6,8-9,12
    alt_is_meta
    include "qwerty-layout"
    include "linux-with-alt-and-altgr"
    include "compose.latin1"
    include "euro1.map"
    strings as usual
    Look at each file until you find what you want to edit.
    gzip the us.map file when done
    The qwerty-layout.inc is the include file with the keycodes for letters including z and y
    I edit,save,load map.gz,convert to binary kmap,load kmap.
    #loadkeys /usr/share/kbd/keymaps/i386/us.map.gz
    Create the busybox binary kmap file.
    #dumpkmap > mojos.kmap
    #mv mojos.kmap /usr/share/kmap
    #loadkmap < /usr/share/kmap/mojos.kmap
    Logout X Session
    Login X Session, open xterm
    When I press z key terminal prints y
    When I press y key terminal prints z

    To change back to previous keymap:
    #loadkmap < /usr/share/kmap/us.kmap
    Logout/in X Session

    To use /sbin/tazkeymap you have to add new entry.
    Open in text editor as root
    Add your new keymap under "us" "USA" /
    Follow same format


    Custom cook a kbd-busybox.tazpkg to include your keymap:
    Clone the wok,go to kbd-base/stuff
    Add your keymap to keymaps-path.list (keymap whitelist)
    #tazwok cook kbd-busybox
  • slicelslicel March 2011
    I did all this before starting this thread but it did not work then and still does not work now.

    Install kbd-base.tazpkg
    This installs to /usr/share/kbd/keymaps/i386
    gunzip the keymap to read it.
    The us.map says it is combined with 4 include files :
    # us.map
    keymaps 0-2,4-6,8-9,12
    alt_is_meta
    include "qwerty-layout"
    include "linux-with-alt-and-altgr"
    include "compose.latin1"
    include "euro1.map"
    strings as usual
    Look at each file until you find what you want to edit.
    gzip the us.map file when done
    The qwerty-layout.inc is the include file with the keycodes for letters including z and y
    I edit,save,and load to test the edit.


    The test failed after reboot so I stopped there.

    Is the next part necessary to change the keys?  It looks like it only saves the changes under a different name.

    #loadkmap us.map.gz
    Create the busybox binary kmap file.
    #dumpkmap > mojos.kmap
    #mv mojos.kmap /usr/share/kmap
    #subox tazkeymap
    Choose mojos

    Custom cook a kbd-busybox.tazpkg to include your keymap:
    Clone the wok,go to kbd-base/stuff
    Add your keymap to keymaps-path.list (keymap whitelist)
    #tazwok cook kbd-busybox


    I am not sure that my system uses any of those files that I edited.
  • mojomojo March 2011
    I revised the instructions in my previous post.
    Procedure works on slitaz-2.0 xvesa
  • slicelslicel March 2011
    The third directions did not work either.  It looks like your file system is different.

    I changed the filepath to ~/i386/qwerty/us.map.gz and then it worked on live cd and a fresh hd installation but not the earlier earlier hd installation.

    As root
    Install kbd-base with any depends
    Edit /usr/share/kbd/keymaps/i386/include/*.inc
    # loadkeys /usr/share/kbd/keymaps/i386/qwerty/us.map.gz
    # dumpkmap > /usr/share/kmap/us.kmap
    # loadkmap < /usr/share/kmap/us.kmap
    Re-login

    That works on a fresh hd but installing other packages breaks it, testing custom compound keystrokes.  Xorg hijacks the system.  It might be related to wine.

    How can I purge xorg from the keyboard?

    Thank you

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Apply for Membership

Tagged

SliTaz Social