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 


Reply via email to