Friday, September 08, 2023

Return To Control_Right Using XModmap And XCape

return to control-right using xmodmap and xcape

1. background

see previous article on dont punish your finger tips that described how to minimize chording in emacs. that article alluded to possibly using return as an additional controlright key; this article describes the implementation and things i discovered in setting it up.

the design described here was discovered by this google search.

2. overview of changes

2.1. xmodmap

add the following stanza to your xmodmap file to set up the needed keys:

! ret as ctrl_r
 remove control = control_r
 keycode 0x69 = return
 keycode 0x24 = control_r
 add control = control_r

2.2. xcape

next, have xcape emit controlr when return is held down:

control_r=return;\

you can find the complete implementation below:

3. lessons learn

  • 1. the above works — i can now hold down return with my right hand when hitting keys like a with my left; this makes my fingers happy.
  • one issue that i failed to fix — though unimportant except for my curiosity:
  • the controlr key on my laptop has now turned into a return key, it produces return in all cases, i.e., whether tapped or held-down.
  • i still continue to find xmodmap confusing — though that is likely my fault, and not that of xmodmap.

date: 2023-09-08 fri 00:00

author: t.v raman

created: 2023-09-08 fri 08:54

validate