Opened 12 years ago

Last modified 5 years ago

#8574 new enhancement

Some keys on thinkpad keyboard are unuseable in Haiku

Reported by: pulkomandy Owned by: nobody
Priority: low Milestone: Unscheduled
Component: Drivers/Input/PS2/Keyboard Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

I have an IBM Thinkpad computer. There are two extra keys above the directional arrows, with symbols that looks like "previous/next slide" or something like that. The Thinkpad layout in keymap shows them, but they don't seem to work. Dragging stuff to these key in the preflet does nothing (key stays blank), and I can't click them, and they don't react if I press the physical key.

I think they should work ?

Attachments (1)

haiku_keylogger.zip (8.3 KB ) - added by jscipione 12 years ago.
Zip file contains a Haiku application, run at command line to detect keycode for key

Download all attachments as: .zip

Change History (18)

comment:1 by umccullough, 12 years ago

They are the "back" and "forward" keys.

On my Windows 7 Thinkpad, they essentially behave like the back/forward buttons in the browser - and supposedly also like a next/previous page in some apps.

Reading around, it seems a lot of people usually remap them because they cause frustration.

comment:2 by jscipione, 12 years ago

They are the back and forward keys for the browser, at least they work in this respect in Windows. Newer ThinkPads have replaced those keys with Page Up and Page Down. Anyway, when I worked on the ThinkPad keyboard layouts I included those keys and mapped them to 0x9a and 0x9b respectively. I don't remember why, perhaps I copied the existing IBM ThinkPad layout file here. Anyway, you can remap those keys to make them do something else, or, if you are really ambitious, you can make them work as media keys to go backwards and forwards in Web+ instead.

comment:3 by pulkomandy, 12 years ago

The problem is, I *can't* remap them. No way to drag another key on them, nor a character from charactermap. and they don't get pressed in the preflet when I press the physical key. Maybe the keycodes are different between my model and the one the keymap was tested with ? Can I check that somehow ?

by jscipione, 12 years ago

Attachment: haiku_keylogger.zip added

Zip file contains a Haiku application, run at command line to detect keycode for key

comment:4 by jscipione, 12 years ago

I attached an application, which I believe you gave me in the first place, that detects what keycode a key produces. It is a command line app, run it and push the key to detect what keycode the key produces. If they don't produce any keycode then we'll have to handle these keys in a different way, which, atm, I am not sure how to handle.

comment:5 by pulkomandy, 12 years ago

Component: Preferences/KeymapDrivers/Keyboard
Owner: changed from axeld to nobody

I get no key event with the keylogger either. Moving to component driver/keyboard ?

comment:6 by jscipione, 12 years ago

So these keys are not being captured by input server at all, which I feared. Unfortunately this means that the keys are unmappable and should probably be taken out of the keyboard layout for now.

Whomever wants to figure this out should also provide a solution to include other missing keys like the fn key. Not only on this keyboard, but for the Apple Aluminum keyboard which has similar keys, fn, and eject.

comment:7 by axeld, 12 years ago

Type: bugenhancement

IIRC they can be used via ACPI; they are not connected to the PS/2 bus, so it won't be easy to change the current behavior even if there is a driver for this, as we would need to multiplex different drivers to a single keyboard.

comment:8 by leavengood, 12 years ago

Why couldn't the ACPI keys be handled by an ACPI keyboard driver? It all gets fed into the input_server either way. Does it really need to be multiplexed into one keyboard?

comment:9 by Kev, 11 years ago

I have some media keys that would be handy to use, too, on my emachines KB-9908 PS/2 keyboard. I tried the keylogger app on hrev45404 gcc4, but it crashes immediately:

~/Desktop> haiku_keylogger runtime_loader: /boot/home/Desktop/haiku_keylogger: Could not resolve symbol 'ArchiveC12BApplicationP8BMessageb' resolve symbol "ArchiveC12BApplicationP8BMessageb" returned: -2147478780 runtime_loader: /boot/home/Desktop/haiku_keylogger: Troubles relocating: Symbol not found

comment:10 by anevilyak, 11 years ago

That's not a crash, that's simply the fact that keylogger is a gcc2 app and your gcc4 haiku appears not to have the hybrid libs installed.

comment:11 by Kev, 11 years ago

Sorry. hrev45362 gcc2hybrid has it work correctly, and keypresses in general show up in the output window, but none of the 6 media keys on my keyboard show up.

comment:12 by cocobean, 6 years ago

hrev52017. We can close this ticket based on user feedback as resolved in hrev45362.

comment:13 by pulkomandy, 6 years ago

I'm the original reporter and the issue is still here. Any non-standard keys will be swallowed by the driver. This is probably because we map them to BeOS style scancodes, and many keys never got assigned one. So the keyboard driver doesn't know what to do, and the event isn't sent at all.

Comments like this are not much helpful:

  • I get a notification everytime you say something in a ticket
  • I need to spend time reviewing what you say, carefully re-reading the comments (you didn't, Kev clearly says that none of his "multimedia" keys are working either)

So, unless you are really sure the issue is solved, you are not adding any value with such comments. Sorry, I understand you are trying to be helpful, but in this case, you are not.

comment:14 by cocobean, 6 years ago

My mistake if not specifically verifying/saying things beforehand. I 'thought' I'd tested this as working - but now wondering why this works at all for me. Let me tell you my end:

I used the Keymap app and utility to see the codes and layouts. Then, I reviewed the Thinkpad layout keys and press the keys to see which ones were detected as well in the keymap GUI. Same test on my desktop.

I use the Pg Up/Down and arrow keys in Haiku for browsing bash history in OpenTerminal and restart my videos in MediaPlayer or web browse. They work in Haiku, for me, so I thought the issue was fixed (IMHO). I tested this on my other laptop and my desktop and the keys worked. As for multimedia keys, I reviewed keymap for customizing for various keyboards I own as I have a keyboard with DVD playback keys and other variants.

So I explored this by using 'keymap -d' to review the codes. Now, this is on my system as yours may differ. I usually remap keys or review the keymap tool. I figured you could assign the keys the way you want and reload a new keymap that works for you (like my up arrow also does 'shutdown -r'). Then, I reviewed the included Thinkpad layouts in Keymap->Layout->Thinkpad to compare notes or just use them if I needed.

In this example my laptop is a Thinkpad T-series yet I use the Thinkpad X1 keymap layout where the Page Up/Down keys and other keys are positioned correctly for my keyboard. I need to include the volume and sound keys/buttons.

I haven't looked at the input server or driver to see the limitations as you mentioned - yet. Thanks for that tip.

So, I honestly thought it was fixed. But, sorry if I caused some confusion.

Last edited 6 years ago by cocobean (previous) (diff)

comment:15 by pulkomandy, 6 years ago

These next/previous page are not the same as page up and page down (the Thinkpad layout has changed a bit since then)

Here is a picture of a keyboard with such keys: http://xahlee.info/kbd/i3/lenovo_thinkpad_x220_keyboard_92940.jpg

Later on these keys were replaced with plain page up/page down ones, which indeed work properly.

comment:16 by cocobean, 6 years ago

I have them down as "next/previous page keys" = 0xa7, 0xa6 Sometimes those specific keys are BIOS disabled/enabled/swapped or hard mapped as ALT+27,ALT+26 (ALT+R/L (aka back/forward)).

I'll dig a bit deeper later.

comment:17 by waddlesplash, 5 years ago

Component: Drivers/KeyboardDrivers/Input/PS2/Keyboard
Note: See TracTickets for help on using tickets.