Take a look at our
ThinkPads.com HOME PAGE
For those who might want to contribute to the blog, start here: Editors Alley Topic
Then contact Bill with a Private Message

X41 Tablet Hardware Buttons with linux Mint 18 XFCE

Linux on ThinkPads
Post Reply
Message
Author
Giraf
Posts: 2
Joined: Sat Sep 10, 2016 4:19 pm
Location: Tel Aviv, IL

X41 Tablet Hardware Buttons with linux Mint 18 XFCE

#1 Post by Giraf » Sat Sep 10, 2016 4:31 pm

HI

I got an old X41 Tablet, it runs Linux Mint 18(32bit) XFCE, I use it for painting with MyPaint...

looking to get the buttons under the screen to work..
found this link:
http://www.thinkwiki.org/wiki/Tablet_Hardware_Buttons
but did not got it to work.

does any one know or had any success of getting those buttons to work under Linux ?

Thanks

G

jaspen-meyer
Senior Member
Senior Member
Posts: 837
Joined: Wed May 19, 2010 11:21 pm
Location: Pardubice, Czech Republic
Contact:

Re: X41 Tablet Hardware Buttons with linux Mint 18 XFCE

#2 Post by jaspen-meyer » Sun Sep 11, 2016 1:52 am

One approach to solving the problem is to:
A) figure out what output it generated by pushing each button, and then
B) map that output to the correct behavior/function and save this as a configuration file
C) [may not be necessary] set your OS to automatically load the configuration file at startup

Try 'xev' from the command line -- and output the lines which say "keycode":

Code: Select all

xev|grep keycode
xev - print contents of X events

DESCRIPTION
Xev creates a window and then asks the X server to send it events
whenever anything happens to the window (such as it being moved,
resized, typed in, clicked in, etc.). You can also attach it to
an existing window. It is useful for seeing what causes events to
occur and to display the information that they contain; it is
essentially a debugging and development tool, and should not be
needed in normal usage.
The output of pressing Enter, Esc, Page up, Page down from my x60 is:

Code: Select all

    state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
    state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
    state 0x0, keycode 117 (keysym 0xff56, Next), same_screen YES,
    state 0x0, keycode 112 (keysym 0xff55, Prior), same_screen YES,
Then figure out how to remap your keycode to the correct value (Return, Escape, Next, Prior) in your OS and windows manager by searching for 'remap key xev mint xfce'

This may work:

Code: Select all

xmodmap -e "keycode 000 = Next Next"
replace 000 with the keycode you get when pushing the 'next' button on the tablet screen.
T420 i7 3612QM seabios; T420 i7 3630QM; T400 Q9100 seabios; T61 P9600; T60 libreboot; x62; x60s libreboot, led; x24 xiphmont led

Giraf
Posts: 2
Joined: Sat Sep 10, 2016 4:19 pm
Location: Tel Aviv, IL

Re: X41 Tablet Hardware Buttons with linux Mint 18 XFCE (Solved)

#3 Post by Giraf » Sun Sep 11, 2016 2:45 pm

HI jaspen-meyer
and thank you for your replay.

I did not got any sight from the buttons with the command

Code: Select all

xev|grep keycode
but you gave me a direction and I did more search and found that the command

Code: Select all

sudo evtest
pop out a small menu and when choosing option number 3 -"AT Translated Set 2 keyboard "
it gives to fallowing results:

Tablet button Enter = value 69
Tablet button Esc = value 6b
Tablet button left arrow = value 6e
Tablet button right arrow = value 6d

also in the output of the command "sudo evtes" there is a list with numbers of all other keyboard keys...

So now with the command:

Code: Select all

sudo setkeycodes 69 28 6b 1 6e 114 6d 115 
I can set:
Tablet button Enter to do Enter
Tablet button Esc to do Esc
Tablet button left arrow to do Volume down
Tablet button right arrow to do Volume up

in order to make those changes permanent I put this command without the sudo in the file :

Code: Select all

/etc/rc.local 
it works Just like magic

Thanks allot

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Return to “Linux Questions”

Who is online

Users browsing this forum: No registered users and 34 guests