Re: [dev] [st] question about keyboard shortcuts

From: Feodor <feodorpetrov_AT_vivaldi.net>
Date: Sun, 07 Jul 2024 11:20:52 +0300

2024.07.06 19:51 Eric Pruitt wrote:
>> > I've used xcape and sxhkd with some success in mapping modifier keys,
>> > however in a different situation from yours.
>> >
>> > https://github.com/alols/xcape
>> > https://github.com/baskerville/sxhkd
>>
>> Eric, do you confirm that I have to use sxhkd and xcape?
>
> I don't use either of those. The only other accompanying configuration
> snippets are in tmux which natively supports those escape sequences for
> Ctrl+(Shift)+Tab:
> <https://github.com/ericpruitt/emus/blob/3a5b62e2f1674f2ee1e5c39b758fe23f6e529301/configuration/tmux.conf#L52-L57>.
>
> On Fri, Jun 28, 2024 at 11:03:45AM +0300, Feodor wrote:
>> but the combination CTRL+Tab doesn't work for "escape" command for
>> screen. Instead I get ";5;9~" printed after the prompt when I press
>> CTRL+Tab.
>
> Can you post the actual configuration you're using? I haven't used GNU
> Screen as my daily-driver in some time and no longer have to my
> original
> configuration files, but when I had Ctrl+(Shift)+Tab setup in Screen, I
> think I used "bind" and/or "bindkey" i.e.
> <https://unix.stackexchange.com/a/478013>.
>
> Eric

> The only other accompanying configuration snippets are in tmux which
> natively supports those escape sequences for Ctrl+(Shift)+Tab
I think, screen does not support those sequences by default.
I wrote to screen's mailing lists:
>> I need to set "escape" combination to CTRL+TAB.
> You can't. TAB is CTRL-I in VT100 mode which most terminals use, so
> there is no way to modify that further with CTRL.
As you said, I tried to edit ~/.Xresources:
*vt100.translations: #override \n\
         Ctrl ~Shift <Key>Tab: string(0x1b) string("[27;5;9~")

also tried:
*vt100.translations: #override \n\
         Ctrl <Key>Tab: string(0x1b) string("[27;5;9~")

but still I get ";5;9~" printed after the prompt when I press CTRL+Tab.

My ~/.screenrc is:
startup_message off
term 'screen-256color'
encoding UTF-8
termcapinfo st* ti_AT_:te@
shell -/bin/bash
msgminwait 0
msgwait 0
caption always '%{= kW}%-w%{= Ck}%50>%n %t%{-}%+w%<%{d} %=%{B}%0c%{d}'
escape ^[[27;5;9~
bindkey ^[[1;3D prev
bindkey ^[[1;3C next

> think I used "bind" and/or "bindkey"
for "escape" line:
escape <combination>
is needed.
escape ^Bb -- works for CTRL+b.
Received on Sun Jul 07 2024 - 10:20:52 CEST

This archive was generated by hypermail 2.3.0 : Sun Jul 07 2024 - 10:24:09 CEST