xkeysnail icon indicating copy to clipboard operation
xkeysnail copied to clipboard

xkeysnail reset xkbset config

Open ncaq opened this issue 5 years ago • 5 comments

xkbsetというbounceなどを指定できるツールがあります.

Linux(X11)でキーボードのチャタリングをGnomeなどのアクセシビリティツールを使わずに抑止するにはxkbsetを使う - ncaq

この設定をxkeysnailは何故か消去してしまいます.

2019-04-24T12:08:20 ncaq@indigo/pts/0(0) ~/Desktop
% xkbset bouncekeys 50
2019-04-24T12:09:09 ncaq@indigo/pts/0(0) ~/Desktop
% xkbset q|rg Bounce
Bounce-Keys = On
Beep if Slow/Bounce-Keys about to be turned off = On
Beep on Bounce-Key Reject = On
2019-04-24T12:09:16 ncaq@indigo/pts/0(0) ~/Desktop
% systemctl --user restart xkeysnail.service 
2019-04-24T12:09:31 ncaq@indigo/pts/0(0) ~/Desktop
% xkbset q|rg Bounce
Bounce-Keys = Off
Beep if Slow/Bounce-Keys about to be turned off = On
Beep on Bounce-Key Reject = On

ならばxkeysnailをxkbsetの後に起動すれば良いのかと思うのですがそうもいかなくて, 何故かxkbsetを起動していると私の以下の設定が効かなくなります.

define_keymap(re.compile("Slack|discord"), {
    # j
    K("M-c"): [K("M-Down")],
    K("C-M-c"): [K("C-M-Down")],
    # k
    K("M-v"): [K("M-Up")],
    K("C-M-v"): [K("C-M-Up")],
}, "Slack and Discord switch channel")

デバッガ使って原因を探ってみましたが原因不明でした. ひとまず諦めてissueだけ立てておきます.

ncaq avatar Apr 24 '19 03:04 ncaq

Altキーはdelay対象になっていて連続押し扱いになってるとかそんな感じですかね

ncaq avatar Apr 24 '19 03:04 ncaq

    # x
    K("C-b"): {
        # g
        K("C-u"): pass_through_key,
        # h
        K("j"): [K("C-Home"), K("C-a"), set_mark(True)],
    },

も動かなくなったのでAltだけということでも無いらしい

ncaq avatar Apr 25 '19 05:04 ncaq

Not very good at Japanese but I guess I'm experiencing the same: xkbset gets overwritten after starting xkeysnail. If I manually configure xkbset again after starting xkeysnail, Alt key stops working and bindings does not work sometimes. @ncaq Did you manage to find a workaround?

hexacera avatar Nov 25 '20 13:11 hexacera

@VVVFO In my env, start xkeysnail → xkbset is work. I xmonad startup code have spawn "sleep 10 && systemctl --user restart xkbset-bouncekeys" https://github.com/ncaq/.xmonad/blob/c457a3f4ed5c16f335b302aceb8c10e380c8b6da/xmonad.hs#L186

ncaq avatar Nov 26 '20 14:11 ncaq

I'm not sure if this can be fixed, but if anyone has more info, please provide it. Technically every time xkeysnail is run it's effectively plugging in an entirely new keyboard to the machine - and I think that's what cuases xkbset to "reset". I think this is perhaps something one could solve with udev though such that xkbset was run when new hardware (xkeysnail) was detected... though I don't know what connections xkbset needs to do it's magic... does it have to be the logged in user? Does it just need to know the X screen? or?

joshgoebel avatar Jun 05 '22 17:06 joshgoebel