You are not logged in.
I have the following code in my /etc/rc.local:
# Swap Esc and CapsLock.
/bin/echo keycode 1 = Caps_Lock | /usr/bin/loadkeys
/bin/echo keycode 58 = Escape | /usr/bin/loadkeys
What it does is remapping Caps Lock to Esc and viceversa. Or rather, that's what it used to do. Now it simply doesn't work.
Running it manually (both as root and as a normal user) doesn't work either, and it returns 0 and outputs nothing.
I suspect this may have to do with the relatively new version of the kbd package, 1.15.3-1. I confirmed this by downgrading to version 1.15.2-1.
Ideas?
Last edited by Ideka (2011-05-26 03:34:22)
Offline
I'm not sure who's the upstream for this package, but maybe you should report it there.
http://mailman.archlinux.org/pipermail/ … 20056.html
Last edited by karol (2011-05-23 22:49:51)
Offline
So you think it's a bug?
I reported it here: http://freshmeat.net/projects/kbd
Thanks.
Last edited by Ideka (2011-05-24 00:01:15)
Offline
I've managed to dump, edit and load some settings, so now it says:
[karol@black ~]$ dumpkeys | grep "keycode 1 "
keycode 1 = Caps_Lock
alt keycode 1 = Meta_Escape
shift alt keycode 1 = Meta_Escape
control alt keycode 1 = Meta_Escape
[karol@black ~]$ dumpkeys | grep "keycode 58 "
keycode 58 = Escape
but nothing changed in the way Esc and Capslock behave.
[karol@black ~]$ /bin/echo keycode 1 = Caps_Lock | /usr/bin/loadkeys -v
Changed 0 keys and 0 strings.
(No change in compose definitions.)
[karol@black ~]$ /bin/echo keycode 58 = Escape | /usr/bin/loadkeys -v
Changed 0 keys and 0 strings.
(No change in compose definitions.)
Last edited by karol (2011-05-24 00:27:54)
Offline
Well, it seems it was a bug after all:
Yes. This is regression. The program code was heavily redesigned.
I fixed this in git. But while you can use this:
echo keycode 1 = Caps_Lock | loadkeys -
Offline
Well, it seems it was a bug after all:
Alexey Gladkov (kbd dev) wrote:Yes. This is regression. The program code was heavily redesigned.
I fixed this in git. But while you can use this:
echo keycode 1 = Caps_Lock | loadkeys -
Can you post a link? I don't know if I'm getting this right but I've already tried it before and
[karol@black ~]$ echo keycode 1 = Caps_Lock | loadkeys -
Loading <stdin>
Keymap 0: Permission denied
[karol@black ~]$ sudo echo keycode 1 = Caps_Lock | loadkeys -
Loading <stdin>
Keymap 0: Permission denied
I get an error.
Offline
Well, this is a month late but...
By runnig this:
$ sudo echo keycode 1 = Caps_Lock | loadkeys -
you are only running echo as root, not the whole command. You have to do this:
$ echo keycode 1 = Caps_Lock | sudo loadkeys -
Offline