Opened 5 years ago

Closed 5 months ago

#15224 closed enhancement (fixed)

Implement media keys

Reported by: nephele Owned by: nobody
Priority: normal Milestone: R1/beta5
Component: Drivers/Input Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by diver)

This here to track the Implementation of media keys, with the end goal of having that sweet out of the box experience with the calculator button working.

Tasks:

  • [DONE] add documentation about current and new haiku keycodes (https://review.haiku-os.org/c/haiku/+/1676)
  • (future task: change this when code changes :)
  • [DONE] add mediakeys to ps2 driver (https://review.haiku-os.org/c/haiku/+/1675)
  • (future task: add webcam key on my keyboard, and sms key...)
  • add mediakeys to usb_hid driver
  • add ability for shortcuts (the application/settings thing) to fire ipc calls
  • add default shortcuts file
  • map new keycodes to 0x10 in src/data/keymaps
  • modify the keymap parser and introduce version 4 which allows 256 instead of 128 distinct mapings
  • define new keycodes in headers/os/InterfaceDefs.h (in progress: https://review.haiku-os.org/c/haiku/+/1695)

Attachments (1)

Keymap (2.3 KB ) - added by nephele 5 years ago.
Keymap for driver -> haiku

Download all attachments as: .zip

Change History (9)

comment:1 by mmlr, 5 years ago

As far as USB HID is concerned, there is no change. Special keys will just be reported as normal keys with their special value. These can then be assigned in Shortcuts. This has already worked since the introduction of USB HID.

comment:2 by nephele, 5 years ago

I would think that mapping them would be a bit better, then there is only one mapping needed in the default shortcuts. (i.e users willl just see "volume up" -> "volume up key" instead of severall different ones looking like "volume up" -> "garbage hex value")

On another note I cannot figure out how to assign a key which i shall press in the shortcuts application, is that broken?

comment:3 by pulkomandy, 5 years ago

You just click the "shortcut" column to set keyboard focus on it and press the key to assign it in Shortcuts. It works (for me at least?) but it's confusing.

comment:4 by nephele, 5 years ago

Okay, I see how it is suppose to be used now, confusing indeed.

comment:5 by nephele, 5 years ago

Two more tasks:
map new keycodes to 0x10 in src/data/keymaps
define the new keycodes in headers/os/InterfaceDefs.h

(If there is a way to edit my description i sure have not found it)
For reference I am working on those two at the moment. I will attach the reference file I have for the keycodes in case somebody wants to work on the usb_hid driver (in src/add-ons/kernel/drivers/input/usb_hid)

by nephele, 5 years ago

Attachment: Keymap added

Keymap for driver -> haiku

comment:6 by nephele, 5 years ago

Description: modified (diff)

comment:7 by diver, 5 years ago

Description: modified (diff)

comment:8 by nephele, 5 months ago

Component: - GeneralDrivers/Input
Milestone: UnscheduledR1/beta5
Resolution: fixed
Status: newclosed

fixed in hrev56653

Note: See TracTickets for help on using tickets.