Instead of not working key to assign a different key ?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Instead of not working key to assign a different key ?
Hi friends
I have an old laptop.The laptop's 2 keys(g-h) are not working.I think the keys assign to different keys that the keys are windows keys near CTRLs because linux dont use these keys.Can I assign not working keys to the windows keys?
If you start up `xev` from a terminal window and hit a key it will tell you what the keycode is, (for example F9 gives me keycode 75). Then if you run `xmodmap -e 'keycode 75 = g G'` the letter g would be mapped to F9.
I think there might be problem with using the windows keys. You'll probably have to check the name for the key with xev (ought to be "Super_L" for the left windows key) and then run `xmodmap` to see if Super_L is assigned to any modifier (say, "mod4"). In which case you remove it with `xmodmap -e 'remove mod4 = Super_L'`.
I tried xev(give to me 133 and 134 key codes ),after xev `xmodmap -e 'keycode 133 = g G'`,`xmodmap -e 'keycode 134 = h H'` and now it is working greet
I understand your second say that I should check if the keys already using.But I dont understand how am I check for that if the keys already using for different works?
Run `xmodmap` by itself and it'll print stuff like:
shift Shift_L (0x32), Shift_R (0x3e)
mod1 Alt_L...
If the name for the windows key given by xev is anywhere in the output of xmodmap you run:
xmodmap -e 'remove <modifier> = <name of key>'
where <modofier> is mod3 or something like that, and the name probably is Super_L.
But if it is working and you don't have any bad side effects I don't think it's necessary.
Also, the changes are not premanent, so you'll probably want to put the "xmodmap -e ..." stuff in a script that'll run every time X starts, xinitrc or some KDE-autostart-script.
You can try grabbing the keyboard file being used from
dir /usr/share/kbd/keymaps, modify it and execute loadkeys
using your personal copy. You need to be root to use loadkeys,
Run `xmodmap` by itself and it'll print stuff like:
shift Shift_L (0x32), Shift_R (0x3e)
mod1 Alt_L...
If the name for the windows key given by xev is anywhere in the output of xmodmap you run:
xmodmap -e 'remove <modifier> = <name of key>'
where <modofier> is mod3 or something like that, and the name probably is Super_L.
But if it is working and you don't have any bad side effects I don't think it's necessary.
Also, the changes are not premanent, so you'll probably want to put the "xmodmap -e ..." stuff in a script that'll run every time X starts, xinitrc or some KDE-autostart-script.
I dont think the keys will occur a problem.But I understand you and I will try the keys are already using other works this evening
You can try grabbing the keyboard file being used from
dir /usr/share/kbd/keymaps, modify it and execute loadkeys
using your personal copy. You need to be root to use loadkeys,
That will also change the keys for the console
HTH
Jack
I thing that I dont need a personal copy of my keymaps.Because I changed only two keys.
"Linux" itself doesn't use any keys. It just depends on the applications you run. I like to use the Super (which is the real name for that key before M$ decided that it should have their logo on it) keys for launching applications and switching desktops.
How am I do permanent change these keys? So when I reboot computer,these keys not working.Must I run `xmodmap -e 'keycode 133 = g G'`,`xmodmap -e 'keycode 134 = h H'` commands after every reboots?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.