Thumb scrolling switch [HP TabletPC, Mint 12/Gnome3]

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read this

Thumb scrolling switch [HP TabletPC, Mint 12/Gnome3]

Postby robbyb413 on Sat Mar 03, 2012 2:22 pm

Working on setting up a HP Elitebook 2670p Convertable (TabletPC) with Mint 12/Gnome 3, and all the hardware I've tested works except for the thumb scrolling rocker (not sure what the official name is - couldn't find it in the documentation or online) on the bezel, hoping maybe someone would be willing to lend a hand.

The rocker should serve three fuctions:

scroll up, accomplished by rocking the switch up
scroll down, accomplished by rocking the switch down
enter/select, accomplished by pressing the switch in.

Out of the box the third function does perform as expected, but the first and second - rocking it up or down to act as a scroll wheel - does nothing. Running xbindkeys shows no activity registered when the rocker is pushed up or down. It only registers activity when the switch is pushed in:

Code: Select all
"(Scheme function)"
    m:0x0 + c:36
    Return


There are three additional keys on the bezel - one for rotating the screen, one to send "esc", and one to send "ctrl-alt-delete". All three work. The switch also works 100% under Windows 7 x64, so I know that there isn't a defect with any of the hardware.

I have played with the default "mouse and touchpad" settings applet, as well as installed the gpointing-device-settings package to see if anything in there jumped out at me, but it does not seem to offer any settings that control the switch.

Looking for some help, as I do consider this piece of hardware important, I use it frequently in Windows and would like to have it working 100% in Linux. Any advice on how to make this work is appreciated. Thanks in advance.

Also, I imagine someone will ask me for an output of xinput, so that is as follows:

Code: Select all
⎡ Virtual core pointer                       id=2   [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                 id=4   [slave  pointer  (2)]
⎜   ↳ PS/2 Generic Mouse                         id=11   [slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad                 id=12   [slave  pointer  (2)]
⎜   ↳ Serial Wacom Tablet stylus                 id=13   [slave  pointer  (2)]
⎜   ↳ Serial Wacom Tablet eraser                 id=15   [slave  pointer  (2)]
⎜   ↳ Serial Wacom Tablet touch                  id=16   [slave  pointer  (2)]
⎣ Virtual core keyboard                      id=3   [master keyboard (2)]
    ↳ Virtual core XTEST keyboard                id=5   [slave  keyboard (3)]
    ↳ Power Button                               id=6   [slave  keyboard (3)]
    ↳ Video Bus                                  id=7   [slave  keyboard (3)]
    ↳ Sleep Button                               id=8   [slave  keyboard (3)]
    ↳ HP HD Webcam [Fixed]                       id=9   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard               id=10   [slave  keyboard (3)]
    ↳ HP WMI hotkeys                             id=14   [slave  keyboard (3)]
robbyb413
Level 1
Level 1
 
Posts: 11
Joined: Sun Feb 19, 2012 5:13 pm

Linux Mint is funded by ads and donations.
 

Re: Thumb scrolling switch [HP TabletPC, Mint 12/Gnome3]

Postby Favux on Mon Mar 05, 2012 8:03 pm

Hi robbyb413,

You may be able to find the bezel button's kernel scan codes. Enter a console with <ctrl-alt-F1>; to get back to X enter <ctrl-alt-F7>. Then enter showkey -s in the console and press the bezel buttons. See if the scan codes show up. Next to find the kernel keycodes enter showkey -k and press the bezel buttons. If the rocker switch shows up you may have something to work with because the keys and their corresponding key codes are defined in input.h at /usr/include/linux. If nothing appears for the rocker switch then you're in the same boat as other HP tablet PCs that have some non-functional bezel buttons. The problem would then likely be related to the hp-wmi.ko. The source code for that is in the kernel's source code under platform. It indicates there isn't code in hp-wmi.c to detect the rocker switch. There is currently someone looking into it who has made a little more progress than we have made before. May have finally narrowed down the method that needs to be used to get the missing bezel buttons reporting. But I haven't heard anything in a couple of weeks.
Favux
Level 3
Level 3
 
Posts: 199
Joined: Fri Jul 01, 2011 1:20 am

Re: Thumb scrolling switch [HP TabletPC, Mint 12/Gnome3]

Postby robbyb413 on Tue Mar 06, 2012 1:40 pm

Hi Favux,

Thanks for the reply. Not entirely off topic - I've used a ton of your posts on the Ubuntu Forums to help solve issues with my other TabletPC - a tx2z with the N-Trig digitizer, so thanks for those too.

Back to this topic: I followed your instructions, the outcome was similar to when I used xbindkeys - it registers the middle press, but up and down register nothing. Sounds like as per your post I'm SOL. Too bad, I'd consider it a success even if I could simply assign it as PgUp/PgDn rather than getting full scrolling out of it.

If I go back and check logs after folliowing your instructions, in kern.log I do see this:

Code: Select all
Mar  6 12:30:22 MisfitToy kernel: [13086.240796] atkbd serio0: Unknown key released (translated set 2, code 0x86 on isa0060/serio0).
Mar  6 12:30:22 MisfitToy kernel: [13086.240806] atkbd serio0: Use 'setkeycodes e006 <keycode>' to make it known.
Mar  6 12:30:22 MisfitToy kernel: [13086.531892] atkbd serio0: Unknown key pressed (translated set 2, code 0x87 on isa0060/serio0).
Mar  6 12:30:22 MisfitToy kernel: [13086.531902] atkbd serio0: Use 'setkeycodes e007 <keycode>' to make it known.


Hitting the toggle seems to generate that consistently. Is there a way to utilize this information at all to achieve a result towards what I'm looking to do?

My kern.log also seems to have this all the time:

Code: Select all
Mar  6 10:14:47 MisfitToy kernel: [ 4961.633559] atkbd serio0: Unknown key pressed (translated set 2, code 0xa7 on isa0060/serio0).
Mar  6 10:14:47 MisfitToy kernel: [ 4961.633569] atkbd serio0: Use 'setkeycodes e027 <keycode>' to make it known.
Mar  6 10:14:47 MisfitToy kernel: [ 4961.640372] hp_wmi: Unknown event_id - 9 - 0x3
Mar  6 10:14:52 MisfitToy kernel: [ 4966.581499] hp_wmi: Unknown event_id - 9 - 0x0
Mar  6 10:14:56 MisfitToy kernel: [ 4970.617477] atkbd serio0: Unknown key pressed (translated set 2, code 0xa8 on isa0060/serio0).
Mar  6 10:14:56 MisfitToy kernel: [ 4970.617490] atkbd serio0: Use 'setkeycodes e028 <keycode>' to make it known.
Mar  6 10:14:56 MisfitToy kernel: [ 4970.624264] hp_wmi: Unknown event_id - 9 - 0x4
Mar  6 10:14:57 MisfitToy kernel: [ 4971.522560] hp_wmi: Unknown event_id - 9 - 0x0


Is that anything related or is this a separate issue? Laptop seems to be generating that at random, even when I'm not touching anything or rotating anything, so I'm leaning toward separate issue?

Thanks,

Rob
robbyb413
Level 1
Level 1
 
Posts: 11
Joined: Sun Feb 19, 2012 5:13 pm

Re: Thumb scrolling switch [HP TabletPC, Mint 12/Gnome3]

Postby Favux on Wed Mar 07, 2012 3:59 am

Nice find. We may be able to do something with that. I'd feel better if we saw a press and release for both codes. Let's try to set the scan codes to a XF86 symkey. Check for what's available with:
Code: Select all
xmodmap -pke | grep XF86

I'll guess that XF86Launch6 and XF86Launch7 are available and it is unlikely they are being used by anything. On my system keycodes are 193 and 194 respectively. Since those are X keycodes to get the kernel keycodes subtract 8 from each. Then you would enter in rc.local in /etc the following:
Code: Select all
setkeycodes e006 185
setkeycodes e007 186

above the exit 0 line and reboot.

Then check if in xev you see XF86Launch6 and XF86Launch7 when using the rocker switch. If so you can now bind the rocker switch to an action/command in Compiz or whatever.
Favux
Level 3
Level 3
 
Posts: 199
Joined: Fri Jul 01, 2011 1:20 am

Re: Thumb scrolling switch [HP TabletPC, Mint 12/Gnome3]

Postby robbyb413 on Wed Mar 07, 2012 11:19 am

Looks to be successful.... output of xev shows press and return, it looks like:

Code: Select all
KeyPress event, serial 29, synthetic NO, window 0x1e00001,
    root 0xad, subw 0x0, time 67531, (334,-29), root:(422,63),
    state 0x0, keycode 193 (keysym 0x1008ff46, XF86Launch6), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x1e00001,
    root 0xad, subw 0x0, time 67704, (334,-29), root:(422,63),
    state 0x0, keycode 193 (keysym 0x1008ff46, XF86Launch6), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 32, synthetic NO, window 0x1e00001,
    root 0xad, subw 0x0, time 68470, (334,-29), root:(422,63),
    state 0x0, keycode 194 (keysym 0x1008ff47, XF86Launch7), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x1e00001,
    root 0xad, subw 0x0, time 68702, (334,-29), root:(422,63),
    state 0x0, keycode 194 (keysym 0x1008ff47, XF86Launch7), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False


Now the TFN Question, since my entire experience with keymapping and shortcuts is what I can see in the "shortcuts" tab of the keyboard control applet and grabbing the input of the rotate bezel button and mapping that to a rotation script using xbindkeys on this machine, how do I translate that to the desired action of PgUp and PgDn? Using xbindkeys-config, while I can get it to grab the toggle now, I do not know what to put in the "Action" field to actually perform PgUp or PgDn.

I had the PgUp and PgDn keypress info from xbindkeys, tried putting that in the action boxes and rebooting - no joy. I searched on google and found lots of threads trying to link PgUp and PgDn to xbindkeys, but no steps for actually doing it. Am I barking up the wrong tree trying to use xbindkeys for this? I'm sure this isn't rocket science, but I'm not exactly an expert here so forgive the dumb question.
Attachments
xbindkeysshot.jpg
Unsure of what to put in the action field
xbindkeysshot.jpg (51.96 KiB) Viewed 2091 times
robbyb413
Level 1
Level 1
 
Posts: 11
Joined: Sun Feb 19, 2012 5:13 pm

Re: Thumb scrolling switch [HP TabletPC, Mint 12/Gnome3]

Postby Favux on Wed Mar 07, 2012 3:17 pm

That's great that it worked and you now have the rocker switch emitting symkeys. You'd hope that was the hard part.

Sorry, I don't use Xbindkeys so I don't know how to set it up. I'd think once you figured it out (the syntax) it should do the job. Sure looks like it from the screen shot you show anyway.

PageUp and PageDown are synonyms for Prior and Next so you could try them. Also Up and Down are the up and down arrow keys I believe. They might be worth a shot.
Favux
Level 3
Level 3
 
Posts: 199
Joined: Fri Jul 01, 2011 1:20 am

Re: Thumb scrolling switch [HP TabletPC, Mint 12/Gnome3]

Postby robbyb413 on Thu Mar 08, 2012 10:42 am

Ok, I will try that and see how it goes. Thanks for you help, very much appreciated.

If anyone else has suggestions for how to finish this off I am open to ideas :)
robbyb413
Level 1
Level 1
 
Posts: 11
Joined: Sun Feb 19, 2012 5:13 pm

Re: Thumb scrolling switch [HP TabletPC, Mint 12/Gnome3]

Postby Favux on Thu Mar 08, 2012 11:14 am

I wonder what would happen if instead of assigning the rocker switch to XF86 symkeys we tried assigning it directly. Skipping Xbindkeys altogether.

Xmodmap:
Code: Select all
xmodmap -pke > xmodmap-pke.txt

says:
Code: Select all
keycode 111 = Up NoSymbol Up
keycode 112 = Prior NoSymbol Prior

keycode 116 = Down NoSymbol Down
keycode 117 = Next NoSymbol Next

Using Prior and Next and subtracting 8 from the keycodes in rc.local it would become:
Code: Select all
setkeycodes e006 104
setkeycodes e007 109

instead of:
Code: Select all
setkeycodes e006 185
setkeycodes e007 186

I'm thinking there isn't a conflict doing it this way. The PageUp and PageDown keys may be calling the same code but so what? My keyboard has two of each anyway.
Favux
Level 3
Level 3
 
Posts: 199
Joined: Fri Jul 01, 2011 1:20 am

Re: Thumb scrolling switch [HP TabletPC, Mint 12/Gnome3]

Postby robbyb413 on Thu Mar 08, 2012 12:57 pm

Yeah, that works just fine. Keys and thumb toggle both work as expected, no issues created. My work day just got a ton better because I've got that working, thanks for the advice and the help.
robbyb413
Level 1
Level 1
 
Posts: 11
Joined: Sun Feb 19, 2012 5:13 pm

Linux Mint is funded by ads and donations.
 

Return to Hardware Support

Who is online

Users browsing this forum: No registered users and 18 guests