Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
12-16-2020, 07:53 PM
|
#1
|
Member
Registered: Jul 2014
Location: Waldron Arkansas
Distribution: Debian 10 Buster
Posts: 49
Rep: 
|
I think my key map file is messed up and I want to replace it.
I am running Buster on my MSI 97 Guard Pro Motherboard, I5 Intel CPU, 8 gig ram, and about 2.5T of hard drives. I ran Jessie for a long time but decided to upgrade to Buster when it came out. I recently decided to upgrade to wireless keyboard and mouse. I bought a cheep one from Dell. A KM636 it says on the box. It worked fine for a short while but after some visitors were here and the computer got piled up on the keyboard is not working properly.
The problem is that the keypad on the side is no longer working when you want to use the numbers. No matter if you press the Num Lock or not it always does the same thing as if it was in the other half of the Num lock doing editing functions, but I do not use them so am not familiar with them. I like using the numbers so that is all I use on the pad. I called the help line and got the helpful people from Asia to help and they finally gave up and sent me a new product. I installed that new set an it still will not do numbers. I put my old keyboard back on and it will not do numbers any more. The numbers at the top of the keyboard work fine. I just like using the pad. After many reboots I am sure it is not related to not rebooting after changes which should not be necessary on Linux anyway. I have been trying to find out where the key map file is located and would like to replace it to make sure that the file is not corrupt. BUT I can not find it or a real key mapping tool or program to look at the file to see what output comes out when the number pad numbers are pressed.
I really think it is probably related to a messed up keyboard map file. A long time ago I think I could look at the key map files and edit them to make keys do what I wanted to do differently but now I cant find the map file or an editor that I could use to check to see what each key press does when pressed. The key maps program on the software on here shows what the three mouse buttons, shift keys, Ctl keys, and the Alt key when they are pressed and not even what code they send. Any help would be appreciated. I have been trying to figure this out for more than a month and I am pulling my hair out what is left any way. Even google did not know how to find the keymap file.
I should say I have used the two new keyboards and mouses and two old ones that are PS2 keyboards and two other USB mice to no good outcome. I have both keyboards working now wired and wireless and both types of mouse working also. funny working with both on. LOL. Any way I know that the system has a key map file that is read when it is booted up so it knows what code each key represents.
Merry Christmas......
Don
|
|
|
12-17-2020, 01:02 AM
|
#2
|
Senior Member
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,849
|
Quote:
Originally Posted by Don Littlefield
[snip]
I recently decided to upgrade to wireless keyboard and mouse. I bought a cheep one from Dell. A KM636 it says on the box. It worked fine for a short while but after some visitors were here and the computer got piled up on the keyboard is not working properly.
|
I'm scratching my head as to how piling stuff on top of your keyboard would cause the keymap information to be corrupted.
A couple of things to try:
First...
Open up a terminal emulator and run "xev" (move the GUI window so that it doesn't obscure the terminal window). Then press each key -- "a", "b", "c", etc. -- and watch for output in the terminal window. Take a look at the manpage for dumpkeys(1). Switch to a console (Ctrl-Alt-F1, for example) and run "dumpkeys -l | less". (I suggest running it through "less" as "dumpkeys" spits out a fair number of lines of output and you'll want to refer to various parts of its output.) You'll see a four digit hexadecimal code for each key. When you press keys while running "xev" you'll see a response in the terminal: Example, press "z" and you'll see "XLookupString gives 1 bytes: (7a) 'z'". "dumpkeys" says the keycode is "0x007a". So that one works. Only 100 to go. Just kidding. Switch between console and X11 (Cltr-Alt-Fn and -F7) and do some spot checking using keys that you think aren't working properly. Make sure they a.) respond and b.) that the code being returned by "xev" matches what's in the "dumpkeys" output. If you see that the returned code isn't what's in the output of "dumpkeys", then, yeah, you have some weird keymap problem.
If you're still interested in remapping your keys, look into the combination of "dumpkeys" (with the right command line switches) and "loadkeys".
If a key does not respond with any "xev" output, that key is likely broken. Does it feel "odd" when you press it? If your cheapo keyboard has a broken key, I doubt there's much you can do to fix it. If it's merely stuck, you might bring it back to life by gently pulling up on it by the edges using a small flat screwdriver. (A stuck NumLock key may be the cause of your numeric keypad problem.)
Or...
It sounds like you've tried other keyboards and are seeing the same problem regardless of the keyboard. If you can get into some kind of system configuration GUI, see if there's a menu option for changing the keyboard type/language. First, make sure the keyboard type is correct (it's most likely a 101-key device so double check that). If you need to change that, see if the change fixed the problem. If not, I'd then try changing it to some foreign language, applying the change, and then, re-enter that configuration menu and changing it back to English (or whatever language). That might reset any odd settings that have been made your keyboard mapping.
Friendly suggestion: You might consider putting your keyboard and mouse away when rowdy visitors come over. To avoid "stuff" getting piled/spilled on it again.
Worst case scenario: Replace the keyboard. If memory serves, the Logitech wireless kbd and mouse combination that I got several years ago for a Raspberry Pi cost all of $20-$25 incl. tax.
HTH...
Good luck...
|
|
|
12-17-2020, 11:17 AM
|
#3
|
LQ Veteran
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Salix
Posts: 6,229
|
If the problem is just the keypad, then you only need try xev with NumLock and one key on the keypad! You can also check your setup with the command
$ setxkbmap -print
I see that you can instruct Gnome to set NumLock on boot-up with the command
$ gsettings set org.gnome.desktop.peripherals.keyboard numlock-state true
|
|
|
12-17-2020, 12:17 PM
|
#4
|
Member
Registered: Jul 2014
Location: Waldron Arkansas
Distribution: Debian 10 Buster
Posts: 49
Original Poster
Rep: 
|
Most likely I messed up after t he visitor problems. I have been trying to see if i could find the answer by trying the function keys and others but no success.
I did run xev and it does a good job of reporting the keys on the left side of the keyboard till you get to the keypad. Quits working there. only function I can see is Num lock and enter. Num turns on and off the led indicator. enter still works but does not report on screen. After I try a key in the pad it stops the xev from working. Other keys just type on the bottom of the screen like normal. but can not use return to quit and send the input.Have to kill and restart terminal and xev to try again.
I tried to change language to aus english but did not work or I did not do it right.
4 different keyboards work the same so must not be keyboard problem.
Dumpkeys does make a lot of output but I dont understand it. Idont see equivalent numbers for any keys on the output though. I will be looking at loadkeys later today.
thanks
Don
Last edited by Don Littlefield; 12-17-2020 at 12:19 PM.
Reason: sentence structure change
|
|
|
12-17-2020, 12:43 PM
|
#5
|
Member
Registered: Jul 2014
Location: Waldron Arkansas
Distribution: Debian 10 Buster
Posts: 49
Original Poster
Rep: 
|
I can not find any of the files listed in the loadkeys man page also. I am begining to think that reloading is the answer if the files are not there.
By the way do you have access to Buster? can you see the files listed in the man page? for the keymaps?
|
|
|
12-17-2020, 12:47 PM
|
#6
|
Member
Registered: Jul 2014
Location: Waldron Arkansas
Distribution: Debian 10 Buster
Posts: 49
Original Poster
Rep: 
|
show keys shows the key numbers of all the keys on two of keyboards and the keypads. There must be a map file or a table somewhere.
That shows that the keyboards are working. And the output gets to the screen using showkeys.
Last edited by Don Littlefield; 12-17-2020 at 12:48 PM.
Reason: added content
|
|
|
12-17-2020, 01:48 PM
|
#7
|
Senior Member
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,849
|
Quote:
Originally Posted by Don Littlefield
Most likely I messed up after t he visitor problems. I have been trying to see if i could find the answer by trying the function keys and others but no success.
I did run xev and it does a good job of reporting the keys on the left side of the keyboard till you get to the keypad. Quits working there. only function I can see is Num lock and enter. Num turns on and off the led indicator. enter still works but does not report on screen. After I try a key in the pad it stops the xev from working. Other keys just type on the bottom of the screen like normal. but can not use return to quit and send the input.Have to kill and restart terminal and xev to try again.
|
So when you run "xev" and test keypad keys you don't you see anything like:
Code:
[I][B]# Keep mouse in "xev" window
#
# I pressed keys NumLock on, Keypad 1, 2, and 3, NumLock off, and, then, Keypad 1 (End) and 2 (Down)
#
KeyPress event, serial 40, synthetic NO, window 0x8a00001,
root 0x56a, subw 0x0, time 406076782, (99,64), root:(236,162),
state 0x0, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 40, synthetic NO, window 0x8a00001,
root 0x56a, subw 0x0, time 406076900, (99,64), root:(236,162),
state 0x10, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 40, synthetic NO, window 0x8a00001,
root 0x56a, subw 0x0, time 406082817, (99,64), root:(236,162),
state 0x10, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
XLookupString gives 1 bytes: (31) "1"
XmbLookupString gives 1 bytes: (31) "1"
XFilterEvent returns: False
KeyRelease event, serial 40, synthetic NO, window 0x8a00001,
root 0x56a, subw 0x0, time 406082920, (99,64), root:(236,162),
state 0x10, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
XLookupString gives 1 bytes: (31) "1"
XFilterEvent returns: False
KeyPress event, serial 40, synthetic NO, window 0x8a00001,
root 0x56a, subw 0x0, time 406083305, (99,64), root:(236,162),
state 0x10, keycode 88 (keysym 0xffb2, KP_2), same_screen YES,
XLookupString gives 1 bytes: (32) "2"
XmbLookupString gives 1 bytes: (32) "2"
XFilterEvent returns: False
KeyRelease event, serial 40, synthetic NO, window 0x8a00001,
root 0x56a, subw 0x0, time 406083466, (99,64), root:(236,162),
state 0x10, keycode 88 (keysym 0xffb2, KP_2), same_screen YES,
XLookupString gives 1 bytes: (32) "2"
XFilterEvent returns: False
KeyPress event, serial 40, synthetic NO, window 0x8a00001,
root 0x56a, subw 0x0, time 406083665, (99,64), root:(236,162),
state 0x10, keycode 89 (keysym 0xffb3, KP_3), same_screen YES,
XLookupString gives 1 bytes: (33) "3"
XmbLookupString gives 1 bytes: (33) "3"
XFilterEvent returns: False
KeyRelease event, serial 40, synthetic NO, window 0x8a00001,
root 0x56a, subw 0x0, time 406083797, (99,64), root:(236,162),
state 0x10, keycode 89 (keysym 0xffb3, KP_3), same_screen YES,
XLookupString gives 1 bytes: (33) "3"
XFilterEvent returns: False
KeyPress event, serial 40, synthetic NO, window 0x8a00001,
root 0x56a, subw 0x0, time 406089860, (99,64), root:(236,162),
state 0x10, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 40, synthetic NO, window 0x8a00001,
root 0x56a, subw 0x0, time 406089934, (99,64), root:(236,162),
state 0x10, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 40, synthetic NO, window 0x8a00001,
root 0x56a, subw 0x0, time 406090908, (99,64), root:(236,162),
state 0x0, keycode 87 (keysym 0xff9c, KP_End), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 40, synthetic NO, window 0x8a00001,
root 0x56a, subw 0x0, time 406091050, (99,64), root:(236,162),
state 0x0, keycode 87 (keysym 0xff9c, KP_End), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 40, synthetic NO, window 0x8a00001,
root 0x56a, subw 0x0, time 406091200, (99,64), root:(236,162),
state 0x0, keycode 88 (keysym 0xff99, KP_Down), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 40, synthetic NO, window 0x8a00001,
root 0x56a, subw 0x0, time 406091333, (99,64), root:(236,162),
state 0x0, keycode 88 (keysym 0xff99, KP_Down), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
If your keypad tests look way different than the log I showed above, I'd look for strange timestamps on the keymap files in /usr/share/kbd/keymaps/xkb. Compare the checksums of the "strange" keymap file(s) against the same file(s) on a "live" DVD (presuming you have one laying around). At some point, either copying a keymap file from the "live" DVD might be a solution. Or... backing up your data and re-installing the OS might be necessary, as a last resort, though.
Good luck...
(I have to include my mandatory comment about how advantageous it is to have the OS and /home on separate filesystems.)
|
|
|
12-17-2020, 04:16 PM
|
#8
|
Member
Registered: Jul 2014
Location: Waldron Arkansas
Distribution: Debian 10 Buster
Posts: 49
Original Poster
Rep: 
|
Ok I got different results just now. I have done another reset and logon and used differnet
Gnomes in the logon. was all the same this morning. But now back to the standard Gnome I got
this result with xev that I did not get before. However when I did a Cntl C to stop and test the action of the pad it still does not work to print the numbers when typed. This is progress though.
KeyRelease event, serial 37, synthetic NO, window 0x2c00001,
root 0x39c, subw 0x0, time 16844966, (1350,148), root  1400,269),
state 0x10, keycode 77 (keysym 0xff7f, Num_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x2c00001,
root 0x39c, subw 0x0, time 16849397, (1350,148), root  1400,269),
state 0x0, keycode 79 (keysym 0xff95, KP_Home), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x2c00001,
root 0x39c, subw 0x0, time 16849574, (1350,148), root  1400,269),
state 0x0, keycode 79 (keysym 0xff95, KP_Home), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x2c00001,
root 0x39c, subw 0x0, time 16859869, (1350,148), root  1400,269),
state 0x0, keycode 81 (keysym 0xff9a, KP_Prior), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x2c00001,
root 0x39c, subw 0x0, time 16860074, (1350,148), root  1400,269),
state 0x0, keycode 81 (keysym 0xff9a, KP_Prior), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x2c00001,
root 0x39c, subw 0x0, time 16863174, (1350,148), root  1400,269),
state 0x0, keycode 89 (keysym 0xff9b, KP_Next), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x2c00001,
root 0x39c, subw 0x0, time 16863357, (1350,148), root  1400,269),
state 0x0, keycode 89 (keysym 0xff9b, KP_Next), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x2c00001,
root 0x39c, subw 0x0, time 16863856, (1350,148), root  1400,269),
state 0x0, keycode 87 (keysym 0xff9c, KP_End), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x2c00001,
root 0x39c, subw 0x0, time 16864041, (1350,148), root  1400,269),
state 0x0, keycode 87 (keysym 0xff9c, KP_End), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x2c00001,
root 0x39c, subw 0x0, time 16871288, (1350,148), root  1400,269),
state 0x0, keycode 83 (keysym 0xff96, KP_Left), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
|
|
|
12-17-2020, 04:20 PM
|
#9
|
Member
Registered: Jul 2014
Location: Waldron Arkansas
Distribution: Debian 10 Buster
Posts: 49
Original Poster
Rep: 
|
/usr/share/kbd/keymaps/xkb
when I try to go to this directory I can only get to /usr/share/
/kbd is not there in my directory tree. see below this is part of /usr/share
drwxr-xr-x 9 root root 4096 Apr 11 2020 javascript
drwxr-xr-x 3 root root 4096 Mar 30 2020 katepart5
drwxr-xr-x 2 root root 4096 Mar 30 2020 kconf_update
drwxr-xr-x 3 root root 4096 Mar 30 2020 kdevappwizard
drwxr-xr-x 3 root root 4096 Mar 30 2020 kdevclangsupport
drwxr-xr-x 4 root root 4096 Mar 30 2020 kdevcodegen
drwxr-xr-x 3 root root 4096 Mar 30 2020 kdevcodeutils
drwxr-xr-x 6 root root 4096 Mar 30 2020 kdevelop
drwxr-xr-x 3 root root 4096 Mar 30 2020 kdevfiletemplates
drwxr-xr-x 3 root root 4096 Mar 30 2020 kdevgdb
drwxr-xr-x 3 root root 4096 Mar 30 2020 kdevlldb
drwxr-xr-x 2 root root 4096 Mar 30 2020 kdevmanpage
drwxr-xr-x 3 root root 4096 Mar 30 2020 kdevplatform
drwxr-xr-x 4 root root 4096 Mar 30 2020 kdevqmljssupport
drwxr-xr-x 2 root root 4096 Mar 13 2020 keyrings
drwxr-xr-x 11 root root 4096 Mar 30 2020 kf5
Last edited by Don Littlefield; 12-17-2020 at 04:24 PM.
Reason: changing info
|
|
|
12-17-2020, 10:12 PM
|
#10
|
Member
Registered: Jul 2014
Location: Waldron Arkansas
Distribution: Debian 10 Buster
Posts: 49
Original Poster
Rep: 
|
I finally got out my pile of CD's DVD's and looked through them till i found a live CD. I ran the live CD. I tested the keyboards and found that they all work fine on it. So I started to do a download of the new 10.7 Buster for DVD. I had upgraded from 10.3 before so I did not have a DVD to use this time. I looked all over the Debian site but could not find any place to do forum questions or help to not have to do it this way. Seems a waste of time to not have some help or a way to down load and replace parts of the system, Like key board mapping files.
Thank you guys for responding to my plea for help and all the things to try. I learned a lot from this experience. I just found a Debian Reference guide and downloaded it earlier today. I wonder if all these things you suggested are in there.
How do you mark this problem solved?
Don
|
|
|
12-18-2020, 12:50 AM
|
#11
|
LQ Addict
Registered: Dec 2013
Posts: 19,872
|
Quote:
Originally Posted by Don Littlefield
I looked all over the Debian site but could not find any place to do forum questions or help
|
http://forums.debian.net/
Bring a thick skin if you plan on posting there.
As for your problem, I find it very confusing to say the least and I'm not sure you're coming to the right conclusions in the end.
|
|
|
12-18-2020, 05:23 PM
|
#12
|
Member
Registered: Jul 2014
Location: Waldron Arkansas
Distribution: Debian 10 Buster
Posts: 49
Original Poster
Rep: 
|
The problem has been successfully resolved by reloading the operating system to replace the character mapping files.
|
|
|
12-19-2020, 05:43 AM
|
#13
|
LQ Addict
Registered: Dec 2013
Posts: 19,872
|
Quote:
Originally Posted by Don Littlefield
The problem has been successfully resolved by reloading the operating system to replace the character mapping files.
|
Do you mean you reinstalled the OS?
|
|
|
12-19-2020, 11:52 AM
|
#14
|
Member
Registered: Jul 2014
Location: Waldron Arkansas
Distribution: Debian 10 Buster
Posts: 49
Original Poster
Rep: 
|
yes I did reinstall the operating system.
I finally did get on the linux forum. Thanks for that too.
|
|
|
12-19-2020, 02:01 PM
|
#15
|
LQ Addict
Registered: Dec 2013
Posts: 19,872
|
Quote:
Originally Posted by Don Littlefield
yes I did reinstall the operating system.
|
Captain Hindsight to the rescue:
Seems like overkill. I'm sure the problem would have been solvable.
|
|
|
All times are GMT -5. The time now is 12:59 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|