[SOLVED] down arrow key somehow mismapped or something
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
Weird problem I've been having in Linux. Whenever I press the down arrow, instead of doing the regular key down thing, it either deletes text or backs up in what I've been typing, I'm not totally clear on the pattern. When I'm not typing (paging down through something in nano, for example), it doesn't seem to do anything.
But when I load up my XP virtual machine and try typing in that, it goes down just like it should, so its only happening in Linux, and not as a problem with my keyboard.
I use a laptop, but the problem happens both with the laptop's keyboard and the regular wireless keyboard I use.
Rebooting doesn't fix it, and I have no idea at all on how to fix this.
It sounds like you may have the wrong keyboard mapped in your /etc/X11/xorg.conf file. Win would have its own mapping, so if it is set up correctly, that could explain the wrong behavior in linux.
Have a look at /etc/X11.xorg.conf. It will look something like this:
Quote:
Section "InputDevice"
# generated from data in "/etc/sysconfig/keyboard"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
The XkbModel field should match the number of keys on the keyboard. I have had to count them to make sure. Mine is full size keyboard; so 105 keys is correct for mine.
If you have 111 key buttons, then yes, there this should be updated. I don't see anything there to identify the keyboard.
Since I don't have your keyboard, I can not tell you exactly what to enter as options. Note what I have... The country is identified, and the number of keys. I think that is what you will need to enter. Give it a go, after you update the file you need to restart the desktop. Ctrl + Alt + backspace does the trick on most systems. If not, log out, then back in and test it.
Tried adding those last two lines with both 105 and 111, still the same. Tried pressing down with shift, ctrl, alt, or fn makes it do nothing at all, not even the weird deleting thing.
So I have no idea whats up. It worked fine before, not sure exactly when it happened, sometime yesterday I noticed it.
As root, do a 'cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup' and then do a 'rm /etc/X11/xorg.conf'. That will give you a backup of the original, and erase the original. You can always copy it back, if you still want it.
Then restart the system.
What effect, you won't know for sure until you give it a go.
Some thoughts. Is this a branded keyboard, such as Logitech? If so, could you post what you know about it.
111 key keyboards are not at all common, at least not in my area of the world.
Basically, any keyboard generates scan codes as the keys are pressed. The scan codes are passed to the Xserver, or terminal, and converted there to a character, or action.
It shows you how to disable, or remap a key in linux. There is a man page for xmodmap, the command for remapping keys.
Since the keys work in XP, then there is a correct map for this keyboard. It is possible you do not have the correct map installed in linux. ( Slackware ? ) If this is an international keyboard, then you might have a look for a package(s) for international keyboard. Not sure there, but it would be worth a look.
It shows you how to configure a keyboard form scratch. It shows you how to find the scan code for each button. I would not go this way, unless all else fails.
Launch "xev" from a terminal, and make sure the window that appears is focused. Then press the down key and write down the keycode (shown in the terminal).
Then, add this line to your ~/.Xmodmap file (create one of you don't have it), and replace "###" with the keycode you noted:
Code:
keycode ### = Down
Finally, add this line to your ~/.xinitrc
Code:
xmodmap ~/.Xmodmap
I DON'T KNOW IF THIS WILL WORK IF YOU USE A LOGIN MANAGER, JUST A SUGGESTION.
Launch "xev" from a terminal, and make sure the window that appears is focused. Then press the down key and write down the keycode (shown in the terminal).
Then, add this line to your ~/.Xmodmap file (create one of you don't have it), and replace "###" with the keycode you noted:
Code:
keycode ### = Down
Finally, add this line to your ~/.xinitrc
Code:
xmodmap ~/.Xmodmap
I DON'T KNOW IF THIS WILL WORK IF YOU USE A LOGIN MANAGER, JUST A SUGGESTION.
The key was 116, and when I opened xmodmap, that key was set to rightwin, for some reason (keyboard doesn't even have a right window key). But changing it from that to Down fixed it! Thank you so much
The key was 116, and when I opened xmodmap, that key was set to rightwin, for some reason (keyboard doesn't even have a right window key). But changing it from that to Down fixed it! Thank you so much
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.