You are not logged in.

#1 2013-12-25 21:30:55

smohr
Member
Registered: 2012-05-29
Posts: 33

[solved] keycodes with more than 8bits

Hey,
I got a Logitech Presenter and I try to get it work. The 'page up/down' buttons are correctly mapped but the other two buttons don't seem to work.

I seek out the following information:
- pressing the buttons doesn't generate a key event in gnome (I used 'xev' )
- pressing the buttons generates key events in tty with key codes 425 and 431  (I used showkey)
- executing 'xmodmap -pke' in gnome shows a list of all keycodes up to 255 - it seems that only 8 bit keycodes are handled

What can I do to get keycode 425 in gnome?

I use gnome 3.10.1 with linux 3.12.5.

Thanks for your help.

Samuel

Last edited by smohr (2014-01-14 23:19:50)

Offline

#2 2013-12-25 21:35:13

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,676

Re: [solved] keycodes with more than 8bits

Did you see this wiki article?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2013-12-25 21:56:03

smohr
Member
Registered: 2012-05-29
Posts: 33

Re: [solved] keycodes with more than 8bits

I did.
In /usr/lib/udev/hwdb.d/60-keyboard.hwdb, there is an entry:

 # Logitech Presenter R400
keyboard:usb:v046DpC52Dd*dc*dsc*dp*ic*isc*ip*in00*
 KEYBOARD_KEY_070029=presentation
 KEYBOARD_KEY_07003e=presentation
 KEYBOARD_KEY_070037=displaytoggle

I compared the IDs, it is the same as I found in /dev/input/by-id/ .

In /usr/include/linux/input.h, I get the resolution of presentation which is mapped to key code 425

 #define KEY_PRESENTATION	0x1a9	/* AL Presentation App */

So I don't think, I have to do any configuration at udev.

Offline

#4 2014-01-14 23:19:16

smohr
Member
Registered: 2012-05-29
Posts: 33

Re: [solved] keycodes with more than 8bits

I have solved my problem with a workaround.

I map all the five scancodes to keycodes less than 255:

# Logitech Presenter R400
keyboard:usb:v046DpC52Dd*dc*dsc*dp*ic*isc*ip*in00*
 KEYBOARD_KEY_070029=wimax
 KEYBOARD_KEY_07003e=rfkill
 KEYBOARD_KEY_070037=display_off
 KEYBOARD_KEY_07004b=video_prev
 KEYBOARD_KEY_07004e=video_next

Unfortunately, I did not get how to use keycodes instead of definitions there.

These keycodes are mapped with Xmodmap:

keycode 250 = Prior NoSymbol Prior NoSymbol Prior
keycode 249 = Next NoSymbol Next NoSymbol Next
keycode 254 = F5 F5 F5 F5 F5 
keycode 255 = Escape NoSymbol Escape NoSymbol Escape
keycode 253 = period colon period greater U2026 

Offline

Board footer

Powered by FluxBB