Skip to content

Need help with tricky mapping with HHKB

Not downloaded yet

I have an HHKB external keyboard, where the key at the left of the 1 key is Esc (not tilde/grave), and the tilde/grave is located at the end of the number row.

I also use xcape to re-map my Caps Lock to act as Escape when tapped once, and Control when held down. I have the following lines in my .xinitrc:

setxkbmap -option 'caps:ctrl_modifier'
xcape -e 'Control_L=Escape;Control_R=Escape'

This works fine when using my laptop's keyboard, but when I use my HHKB, I want the Esc to act as tilde/grave, since it's what I'm used to and I'm supposed to already have Escape via Caps Lock.

I was able to successfully map Esc to tilde/grave via xkbcomp and xmodmap separately, but both methods break my CapsLock-as-Escape mapping. Instead of acting as Escape, tapping my CapsLock key now types the tilde/grave character (holding it down still works as Control though).

Any suggestions on how to achieve my ideal layout?

3 points0 comments
Open on Reddit
About this post
Posted
Archived
Score
3 · 100% up
Kind
Image
ID
7f04vs

Author

39
posts
161
comments
10
media
View profile
Nobody had commented when we saved it.

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.