martanne / dvtm

dvtm brings the concept of tiling window management, popularized by X11-window managers like dwm to the console. As a console window manager it tries to make it easy to work with multiple console based programs.
MIT License
848 stars 105 forks source link

super key as MOD #48

Closed rotsix closed 7 years ago

rotsix commented 7 years ago

Hi,

I just discovered dvtm and started loving it for my Pi, but I have a question.

Is it possible to bind the super key (windows key) as MOD? I tried Mod4Mask but that's for X11 if i remember well.

Thanks, and thanks for dvtm!

ghost commented 7 years ago

I do not think this is possible to transmit the Mod4Mask to the terminal. You can try in the TTY:

read

then press Ctrl + v, then Super + any key. The key you pressed will be displayed directly, without any difference with the key pressed directly.

I also asked if it would be easy to use Alt as a modifier (#39), but is not.

What I do instead is Ctrl + Space, which is CTRL('@') in config.h and dvtm -e '^@' in command line.

rotsix commented 7 years ago

you're right, that's not possible. But don't you think that it would be possible to use the w$ key as mod ?

It not, ctrl + space is good, but as a lazy boy, 2 keys are always harder than 1 !

rotsix commented 7 years ago

Mh, weird issue,

neither CTRL('@') nor dvtm -m '^@' are working.

arch 4.8.13 dvtm-0.15

ghost commented 7 years ago

Make sure to have the latest version. This was no possible before this change.

[EDIT]: it seems that this commit is more recent than the version 0.15.

martanne commented 7 years ago

As @josuah correctly pointed out super can't really be detected. You could probably use loadkeys(1) to change the console key mappings. Personally I would recommend against that because I want consistent key bindings independent of the environment (TTY, X11, ...)