Author Topic: HHKB Volume/Media Keys  (Read 22557 times)

0 Members and 1 Guest are viewing this topic.

Offline karljs

  • Thread Starter
  • Posts: 84
HHKB Volume/Media Keys
« on: Sat, 20 February 2010, 18:45:16 »
Hi everybody.

I'm the proud new owner of an HHKB Pro 2, which I absolutely love so far.  My only issue is with the media keys (fn + a/s/d/f) which don't work out-of-the-box in either windows or linux.

I tried to bind the keys manually in my Linux install but the system can't seem to tell the difference between 'A' and 'fn A' instead giving me a warning that I shouldn't bind normal characters.

Has anybody been able to overcome this problem?  The 'fn' key works for other features like the directional keys, pgup, etc.

Offline ch_123

  • * Exalted Elder
  • Posts: 5860
HHKB Volume/Media Keys
« Reply #1 on: Sat, 20 February 2010, 19:40:29 »
I think it's designed for the Mac. There is a different media key standard for Windows keyboards, and Linux uses it too.

Offline bigpook

  • Posts: 1723
HHKB Volume/Media Keys
« Reply #2 on: Sat, 20 February 2010, 19:45:01 »
running ubuntu and yeah, they don't work. I mapped the volume keys as shift + alt + [a,s,d] to control volume in 'keyboard shortcuts. playing with xev shows nothing for the fn key.... odd.
HHKB Pro 2 : Unicomp Spacesaver : IBM Model M : DasIII    

Offline ricercar

  • * Elevated Elder
  • Posts: 1697
  • Location: Silicon Valley
  • mostly abides
HHKB Volume/Media Keys
« Reply #3 on: Sat, 20 February 2010, 19:47:12 »
"Windows" media keys work on MacOSX. The scan codes are recognized in the same manner. For example, my Saitek backlit has media keys which work the same way on MacOS X 10.3.9, 10.4.11 as Windows 2K, XP, Vista, 7.
I trolled Geekhack and all I got was an eponymous SPOS.

Offline karljs

  • Thread Starter
  • Posts: 84
HHKB Volume/Media Keys
« Reply #4 on: Sat, 20 February 2010, 19:57:45 »
I guess for now I'll remap them similar to you, bigpook.

I wonder if playing with the first two switches could get them to register differently...?

Offline ch_123

  • * Exalted Elder
  • Posts: 5860
HHKB Volume/Media Keys
« Reply #5 on: Sat, 20 February 2010, 20:02:18 »
Quote from: ricercar;159741
"Windows" media keys work on MacOSX. The scan codes are recognized in the same manner. For example, my Saitek backlit has media keys which work the same way on MacOS X 10.3.9, 10.4.11 as Windows 2K, XP, Vista, 7.


My original post was somewhat misleading. There's a USB standard (if memory serves me correct) which keyboards made for Windows PCs adhere to. Im pretty sure that Mac has their own ones, given that they had this sort of functionality on their keyboards before it was standardized for Windows.

Who needs media keys anyway? :P

Offline Rajagra

  • Posts: 1930
HHKB Volume/Media Keys
« Reply #6 on: Sat, 20 February 2010, 20:02:19 »
I believe that Apple has used different standards for the media keys between different versions of its OS, and the HHKB uses an older standard. On PFU's website they mention a driver you need to download to make the media keys work on the Mac.

Recent versions of Mac OS seem to have ways to cope with the different media key standards, even for PC keyboards.

But on a PC the volume and mute keys don't even send scan codes that get far enough for utilities to read. Eject does send a readable scancode, so can be remapped with the right tools.

I can understand why Apple wouldn't want to slavishly follow PC standards for the media keys. But can't they at least stick to their own standards?

Offline kishy

  • Posts: 1576
  • Location: Windsor, ON Canada
  • Eye Bee M
    • http://kishy.ca/
HHKB Volume/Media Keys
« Reply #7 on: Sat, 20 February 2010, 20:40:40 »
Quote from: bigpook;159739
playing with xev shows nothing for the fn key.... odd.

Responding to this point in particular, assuming the HHKB Fn key works the same way as it does on other keyboards, the key is not supposed to be visible to software. It alters the code sent by other keys entirely within the keyboard itself so the OS just sees another key entirely for a given combination, rather than [modifier] followed by [key you pressed after].
Enthusiast of springs which buckle noisily: my keyboards
Want to learn about the Kishsaver?
kishy.ca

Offline ch_123

  • * Exalted Elder
  • Posts: 5860
HHKB Volume/Media Keys
« Reply #8 on: Sat, 20 February 2010, 20:41:17 »
Quote from: ripster;159749
Not sure what's up with the HHKB and Linux.


-

Quote from: ch_123;159738
There is a different media key standard for Windows keyboards, and Linux uses it too.

Offline rdjack21

  • Posts: 896
HHKB Volume/Media Keys
« Reply #9 on: Sat, 20 February 2010, 20:48:33 »
You can use showkey on Linux to see if the keys actually produce a scan code then you can use setkeycodes to set them to what you want.

NOTES: showkey and setkeycodes interact directly with the Linux keyboard driver not X11. showkey will only work on a real Terminal or a VT. If you use setkeycodes in a VT with X11 running attached to a another VT your keyboard will no longer work in X just use your mouse to logout (which causes X to restart) and log back in. The advantage is that you can remap anything you want including dead keys. So all you have to do is tell the kernel driver to map those keys to media keys and X11 will pick them up automatically no messing with modmap and to top it off your keys will work correctly in a VT as well. Give me a few days and I will plug mine in and check those keys out and see what they generate as well as look up the keycodes they need to be mapped to for them to work. This is how I remap keys on my Japanese boards with out setting the board to Japanese.
Keyboards
Topre Capacitive: Realforce 87U, Realforce 86U, HHKB Pro 2, Topre MD01B0, Topre HE0100, Sun Short Type, OEM NEO CS (x2), NISSHO Electronics KB106DE
Buckling Spring: IBM Model M Space Saver (1291472), Unicomp Customizer x 2
Cherry Brown: Filco FKBN87M/EB, Compaq MX11800
Black Alps: ABS M1
Not so great boards Rare Spring over dome OKI, Sun rack keyboard

Trackballs - Trackman Wheel (3), Trackman marble (2)
Keyboards I still want to get - Happy Hacking Keyboard Pro 2 the White version, Realforce 23U number pad in black and maybe white, μTRON ergo board with Topre switches.
Previously owned - [size=0]SiiG MiniTouch (White Alps), Scorpius M10 (Blue Cherry), IBM Model M13[/size]

Offline bigpook

  • Posts: 1723
HHKB Volume/Media Keys
« Reply #10 on: Sat, 20 February 2010, 21:03:06 »
Quote from: kishy;159750
Responding to this point in particular, assuming the HHKB Fn key works the same way as it does on other keyboards, the key is not supposed to be visible to software. It alters the code sent by other keys entirely within the keyboard itself so the OS just sees another key entirely for a given combination, rather than [modifier] followed by [key you pressed after].


right, further testing with xev shows that. doh.
HHKB Pro 2 : Unicomp Spacesaver : IBM Model M : DasIII    

Offline JulienC

  • Posts: 73
  • Location: Montreal, Canada
  • Esc Artist
HHKB Volume/Media Keys
« Reply #11 on: Sun, 21 February 2010, 09:06:36 »
Quote from: ripster;159772
Has anyone put the HHKB in Macintosh mode yet to scan for Key Codes?

Yes, in Macintosh mode (switch #1 down, switch #2 up) I can control the volume and mute it on Ubuntu, out of the box. I remember controlling the volume on Windows too, I don't remember in which mode though.
« Last Edit: Wed, 09 October 2013, 11:43:11 by JulienC »

HHKB

Offline Rajagra

  • Posts: 1930
HHKB Volume/Media Keys
« Reply #12 on: Sun, 21 February 2010, 13:10:55 »
NO, setting the DIP switch to MAC mode DOES NOT make the media keys work (or even show) in Windows. At least not my HHKB Pro (older version without USB hub.)

Eject sends scan code 107 (0x6B).
Vol_Dn Vol_Up and Mute all produce nothing.

Tested with AutoHotkey, KeyTweak, and Aqua's Key Test. In Windows XP.

Edit> I have much Logitech and Cherry software loaded. That may affect my results, I suppose.
« Last Edit: Sun, 21 February 2010, 13:20:16 by Rajagra »

Offline Rajagra

  • Posts: 1930
HHKB Volume/Media Keys
« Reply #13 on: Sun, 21 February 2010, 13:22:36 »
It is definitely in Mac mode, as the Eject and Clear keys start working.
(Clear works as numlock, as would happen if you plugged a Mac keyboard into a PC.)

Offline JulienC

  • Posts: 73
  • Location: Montreal, Canada
  • Esc Artist
HHKB Volume/Media Keys
« Reply #14 on: Sun, 21 February 2010, 16:06:03 »
I have no Windows machine to test this on, but I think you need to put your HHKB in "Lite" mode to get the volume keys to work on Windows. It will also turn Fn+Tab into Caps Lock.

Edit: Looking at the Lite's key layout, I'm probably wrong. I can't remember how I was controlling the volume on Windows, maybe I wasn't using the standard HHKB keys ?
« Last Edit: Wed, 09 October 2013, 11:43:05 by JulienC »

HHKB

Offline karljs

  • Thread Starter
  • Posts: 84
HHKB Volume/Media Keys
« Reply #15 on: Sun, 21 February 2010, 19:36:13 »
On my HHKB Pro 2 setting the switches to mac mode gets them working in Linux.  I'll get around to testing in Windows later.

Thanks for the input, everybody!

Offline tamasrepus

  • Posts: 33
    • http://blog.samat.org/
HHKB Volume/Media Keys
« Reply #16 on: Sun, 21 February 2010, 19:36:43 »
If I put my HHKB2 into Mac mode (via a DIP switch), the volume control keys work fine for me under Linux (Debian testing w/KDE).

Not sure what you're missing... have you verified you actually verified that Linux is getting the key codes properly and whatever daemon that's supposed to handle them is handling them? This, unfortunately, is unbelievably confusing w/modern desktops these days.
Noppoo Choc Mini w/ Cherry MX Brown
Happy Hacking Keyboard Professional 2, Black w/labels
Topre Realforce 87U, 55g
ABS M1
Happy Hacking Keyboard Lite 2
Logitech diNovo Edge
Sun Type 6 USB

Offline konz

  • Posts: 28
HHKB Volume/Media Keys
« Reply #17 on: Mon, 22 February 2010, 04:31:55 »
My understanding is that Macintosh mode enables these key combinations.   That's the whole purpose of Macintosh mode.

Offline BigBrother

  • Posts: 87
HHKB Volume/Media Keys
« Reply #18 on: Mon, 22 February 2010, 04:39:08 »
i have a Happy Hacking keyboard Lite (2?) that i could test with.

if i can ever get my debian machine working, i might be able to test this... but so far it's been online college and boxing my room for moving. :/

Offline itlnstln

  • Posts: 7048
HHKB Volume/Media Keys
« Reply #19 on: Mon, 22 February 2010, 09:52:37 »
I tried Mac mode on my HHKB, and the media keys still didn't work in Windows 7 x64 Pro. Love the switches, but the layout is going to take some time to figure out. I am getting killed with the backspace key being one key lower.


Offline ch_123

  • * Exalted Elder
  • Posts: 5860
HHKB Volume/Media Keys
« Reply #20 on: Mon, 22 February 2010, 10:53:23 »
What do these media volume keys do? From the description, they sound like a suboptimal implementation of the volume knob on a decent set of speakers...


Offline Rajagra

  • Posts: 1930
HHKB Volume/Media Keys
« Reply #21 on: Mon, 22 February 2010, 12:26:12 »
Confirms my theory that Fujitsu were key conspirators in the Rick Rolling meme.

Mute. Mute, damnit. MUTE!!!!


Offline BigBrother

  • Posts: 87
HHKB Volume/Media Keys
« Reply #22 on: Mon, 22 February 2010, 21:45:35 »
[weakJoke] My HHKL2 doesn't look like the one above. >_< [/weakJoke]



i need a cover for this thing. >_<
« Last Edit: Mon, 22 February 2010, 21:53:35 by BigBrother »