Page 1 of 1

HHKB Pro 2 - let `diamond' key register as L_Super in Linux?

Posted: 22 Nov 2012, 19:55
by mSSM
So I have an HHKB Pro 2 now, and I am in total awe with Topre switches.

But first thing I have to do is fix the default behaviour of the diamond or Muhenkan key. Here is what the xev command gives me when I press the key under Linux:

Code: Select all

KeyRelease event, serial 36, synthetic NO, window 0x1200001,
 root 0xc7, subw 0x0, time 2296818, (955,48), root:(2236,66),
state 0x0, keycode 102 (keysym 0xff22, Muhenkan), same_screen YES,
XLookupString gives 0 bytes: XFilterEvent returns: False
So what do I need to do for the left Muhenkan key to register as L_Super and the right one as R_Super?

Posted: 22 Nov 2012, 19:58
by trax
I have no clue what you just said but are you sure you have the DIP switches switched right?

Posted: 22 Nov 2012, 20:57
by Findecanor
I think that you should do something like this:

cat "keycode 102 = Super_L" > ~/.my_super_keymap
cat "keycode 100 = Super_R" >> ~/.my_super_keymap
xmodmap ~/.my_super_keymap

If that does not do it, do "man xmodmap" and go from there.

Posted: 22 Nov 2012, 21:03
by fossala
Should't have to, check your dip switches. I use debian and OpenBSD, both fine here. It also sometimes gets plugged into an ubuntu system and all good there.

Posted: 22 Nov 2012, 21:17
by hq1ify
Tried setting the HHKB Macintosh mode? I think it works for me on my X11 box like that, will confirm this later.

Posted: 22 Nov 2012, 22:42
by mSSM
Findecanor wrote:I think that you should do something like this:

cat "keycode 102 = Super_L" > ~/.my_super_keymap
cat "keycode 100 = Super_R" >> ~/.my_super_keymap
xmodmap ~/.my_super_keymap

If that does not do it, do "man xmodmap" and go from there.
Yeah, I could have done that, but I didn't want to carry a custom xmodmap around with me between systems. :)
fossala wrote:Should't have to, check your dip switches. I use debian and OpenBSD, both fine here. It also sometimes gets plugged into an ubuntu system and all good there.
Yeah, that was the solution. Turns out that the dip switch SW1 gives me the correct settings I need. I get Super_L and Super_R now, as I needed. :)

Posted: 23 Nov 2012, 11:35
by woody
Findecanor wrote:cat "keycode 102 = Super_L" > ~/.my_super_keymap
cat "keycode 100 = Super_R" >> ~/.my_super_keymap
xmodmap ~/.my_super_keymap
cat ==> echo

Posted: 13 Jul 2013, 22:54
by Madderoftime
fossala wrote:Should't have to, check your dip switches. I use debian and OpenBSD, both fine here. It also sometimes gets plugged into an ubuntu system and all good there.
Could you check your HHKB P2 and tell what you have for dip switches? I have 1,2,3 on and 4,5,6 off and it is using the HHKB config. Still take for instance the \| is actually #~ and nowhere do I have a \|. Using Raspbian “wheezy”.

Posted: 14 Jul 2013, 05:07
by Madderoftime
NM Finally figured it out. Default layout for the HHKB P2 was GB which thinking now makes sense. Changed the /etc/default/keyboard to US from GB and then no variant (was extd) then removed the lvl3 options and made the win keys control keys with altwin:ctrl_win.

switches on the board 011000

XKBMODEL="hhk"
XKBLAYOUT="us"
XKBVARIANT=""
XKBOPTIONS="altwin:ctrl_win"

All keys work exactly as printed (except for my change to the win keys) and no issues. :)

Posted: 22 Jul 2013, 14:20
by naisanza
Welcome to the family, and glad you figured it out!