LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
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


Reply
  Search this Thread
Old 01-25-2021, 10:26 AM   #1
vuckale
LQ Newbie
 
Registered: Jan 2021
Posts: 2

Rep: Reputation: Disabled
Question evtest doesn't recognize media key presses


I have Compaq sdm4540ul which is also called Compaq Internet Keyboard. Here is an image of it. http://imgur.com/5d0kUUq

As you can see there is a set of keys in the top row. When I run sudo evtest I see 4 events from this keyboard in dev/input namely:

Code:
/dev/input/event12:	Compaq Compaq Internet Keyboard
/dev/input/event13:	Compaq Compaq Internet Keyboard Consumer Control
/dev/input/event14:	Compaq Compaq Internet Keyboard System Control
/dev/input/event15:	Compaq Compaq Internet Keyboard
Now event12 rocognizes all the keys except the top row, event13 is for the top row, 14 and 15 have KEY_POWER, LED_MAIL etc. which I guess are for the LEDs.

I will post all the output in this pastebin link: https://pastebin.com/NHZj0z2k

In that top row of keys there is 7 keys in the middle that evtest doesn't recognize. Every other key in that top row is recognized.

As I mentioned before, event13 seem to be one for those keys in the top row so I have tried to see if input-kbd 13 sees something that evtest doesn't see and I got this:
Code:
0xc00e9 = 115  # volume up +
0xc00ea = 114  # volume down -
0xc00e2 = 113  # mute
0x10081 = 116  # ???
0x10082 = 142  # ???
0x10083 = 143  # ???
0xc00b5 = 163  # next song
0xc00b6 = 165  # previous song
0xc00b7 = 166  # stop
0xc0183 = 171  # eject
0xc00cd = 164  # play/pause
0xc00e5 = 209  # ???
0xc0192 = 140  # ???
0xc0152 = 240  # ???
0xc0153 = 240  # ???
0xc0154 = 240  # ???
0xc0155 = 240  # ???
0xc00b8 = 161  # ???
0xc0224 = 158  # ???
0xc00e7 = 240  # ???
0xc022a = 156  # ???
0xc02a4 = 240  # ? key
0xc02a5 = 240  # person figure key
Some of the keys do match with ones displayed in evtest for instance 0xc00e9 is the volume up key and I get this in evtest for it:
Code:
Event: time 1611589575.471766, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00e9
Event: time 1611589575.471766, type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1
I wrote in comment what which key represents.

I then tried to remap those key that I couldn't get event for in evtest with the udev. For example lets take 0xc022a = 156. In /etc/udev/hwdb.d/ I made a file 70-keyboard.hwdb and wrote:

Code:
evdev:input:b0003v049Fp000E*
 KEYBOARD_KEY_c022a=key_x
049F being vendor ID and 000E product ID and I put key_x randomly to see if pressing the key would return something. After that I have run systemd-hwdb update ; udevadm trigger to update hwdb. Now I pressed every key on the top row and none of them outputs letter x. I was following this guide: https://deskthority.net/viewtopic.php?t=24076 and I am sure this method for remapping works because when I try to remap c00ea which is volume up key I do get letter x back.

I noticed is that the input-kbd returns the same output for events 13, 14 and 15 but here is the input-kbd of every event for this keyboard: https://pastebin.com/vsGtM2tc

I also thought that maybe those set of keys is dead, so I tried to record hid signals in wireshark and I do get signals back when I press those 7 keys.

Other than that I guess it could be that I have to press some key combination or to somehow enable those keys but nothing that I tried worked so far.

This keyboard is designed for windows 95/98 I think and there is a driver for it: https://www.driverguide.com/driver/d...riverid=121503 that I guess could be used to enable those keys but I didn't get it to work on neither windows system that I tried it on.

I appreciate if you have read this far and could give me some thoughts or you have some idea what more I can try?

Last edited by vuckale; 01-26-2021 at 07:47 AM. Reason: Corrected some typos
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
wxwidgets / wxpython: grab global key presses eventhough frame is not in focus? browny_amiga Programming 3 04-10-2009 10:38 PM
C program to perform an operation continuously until user presses a key ananth86coolguy Linux - Newbie 4 03-13-2009 09:59 AM
Simulating Key Presses Hal Programming 2 09-02-2005 05:05 PM
Detecting Arrow Key Presses in C / C++ BooKA. Programming 8 04-07-2004 06:10 AM
How to listen to all key presses in whole Linux? pvv Programming 1 03-28-2004 01:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration