[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Caps Lock affects Ctrl+keys
From: |
Emanuel Berg |
Subject: |
Re: Caps Lock affects Ctrl+keys |
Date: |
Mon, 20 Jan 2014 18:23:30 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Yuri Khan <yuri.v.khan@gmail.com> writes:
>> No, the problem is in the Linux kernel emacs is by
>> no means unique in this behavior.
>
> Kernel? I don't think so. xev(1) reports different
> output when I press Ctrl+Shift+Z and Ctrl+Z with Caps
> on. Firefox opens a new tab on Ctrl+T (and restores
> the last closed tab on Ctrl+Shift+T), no matter if
> Caps is on or off.
Some information on this, see if you can figure it out:
In keymaps(5), there is some information what to do
with caps:
> Which of the actions bound to a given key is taken
> when it is pressed depends on what modifiers are in
> effect at that moment. The keyboard driver supports
> 9 modifiers. These modifiers are labeled (completely
> arbitrarily) Shift, AltGr, Control, Alt, ShiftL,
> ShiftR, CtrlL, CtrlR and CapsShift. Each of these
> modifiers has an associated weight of power of two
> according to the following table:
> modifier weight
> Shift 1
> AltGr 2
> Control 4
> Alt 8
> ShiftL 16
> ShiftR 32
> CtrlL 64
> CtrlR 128
> CapsShift 256
# swap control and caps
keycode 58 = Control
keycode 29 = Caps_Lock
# always enable on caps, disable on either shift
keycode 42 = Uncaps_Shift # left shift
keycode 54 = Uncaps_Shift # right shift
keycode 58 = Caps_On # caps
Note: Get the keycodes with 'showkey', then update
changes to the remap file with 'sudo loadkeys'. If
'showkey' complains it can't get access to the console
it means you are running it for example in tmux, if so
use 'sudo showkey' (every time) or 'sudo chmod u+s
/usr/bin/showkey' to make it work ever since.
With 'showkey -s', it doesn't seem to be possible to
get what you describe.
--
underground experts united:
http://user.it.uu.se/~embe8573
Re: Caps Lock affects Ctrl+keys, Yuri Khan, 2014/01/20
Message not available
Message not available
Message not availableRe: Caps Lock affects Ctrl+keys, Dan Espen, 2014/01/24