You are not logged in.

#1 2015-06-05 02:04:22

thelollies
Member
Registered: 2013-04-20
Posts: 21

[Solved]Remapping Capslock to Ctrl-b

On my OSX laptop I have remapped capslock to ctrl-b since ctrl-b is the prefix that Tmux uses, and I'm a big Tmux user. I would like to do the same for my Arch setup. I don't use a  display manager, just XMonad on top of X11. I've had a play around and read up on configuring xkb and aside from temporarily disabling my keyboard I've had no success tongue.

Has anyone had any luck remapping a key to a key combination?

Last edited by thelollies (2015-06-05 03:33:43)

Offline

#2 2015-06-05 02:33:14

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved]Remapping Capslock to Ctrl-b


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2015-06-05 03:08:02

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Offline

#4 2015-06-05 03:33:27

thelollies
Member
Registered: 2013-04-20
Posts: 21

Re: [Solved]Remapping Capslock to Ctrl-b

This article sorted it for me, thanks karol!

In short,remap caps to F12 by add the following to ~/.Xmodmap:

clear Lock
keycode 66 = F12

Reload mapping with: xmodmap ~/.Xmodmap

Set the prefix in tmux to F12 by adding this to ~/.tmux.conf:

set-option -g prefix F12
bind-key F12 last-window

The second line makes a double-press of caps go to previous window, which is handy.

Offline

Board footer

Powered by FluxBB