• setting keymap codes

    From Hans@21:1/5 to All on Sat Oct 5 12:10:02 2024
    Hi folks,

    for my Lenovo T520 I got a new keyboard. It is a cheap one from China.

    As this keyboard differs in the layout cpompared to the old one, some keys are mapped other (i.e. page-up / down in the original needs the function key = second layer, in th enew one it is just page-up /down without any Function).

    Thus, you guess it, the keycodes differ.

    Whilst the old one gets keycode = 140 (showkeys helped), it is 158 on the new keyboard.

    Now my question: I want to remap the keycodes. The old ones can be find out, but I have to set it to the new keyboard.

    There is xkmodmap, which helps for X, but I also need it on console.

    It would be nice, if you can get me some example, how to set the keycodes for console and for X together and permannetly.

    I believe, setxkbmap will be a good start, but I am not sure.

    Is there a better way? And how should this be done. An example might help,
    lets say, we want change the page-up key from 158 to 140. What is the best
    way?

    Personally I would like to prefer using a configuration file, so that I can felxible edit it and revert to original, when I maybe get another keyboard
    some day.


    Thanks for any hints.

    Best

    Hans

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Charles Curley@21:1/5 to Hans on Sat Oct 5 16:30:01 2024
    On Sat, 05 Oct 2024 12:06:56 +0200
    Hans <hans.ullrich@loop.de> wrote:

    Hi folks,

    for my Lenovo T520 I got a new keyboard. It is a cheap one from
    China.

    As this keyboard differs in the layout cpompared to the old one, some
    keys are mapped other (i.e. page-up / down in the original needs the
    function key = second layer, in th enew one it is just page-up /down
    without any Function).

    Thus, you guess it, the keycodes differ.

    For the console, you might look into setkeycodes.

    --
    Does anybody read signatures any more?

    https://charlescurley.com
    https://charlescurley.com/blog/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)