DreamMaoMao/hycov

Hardcoded Alt keycode 56 prevents using another key

Closed this issue · 3 comments

In function hkOnKeyboardKey() at line 206 of globaleventhook.cpp, the keycode 56 is hardcoded:

  if(g_enable_alt_release_exit && g_isOverView && e->keycode == 56 && e->state == WL_KEYBOARD_KEY_STATE_RELEASED) {

This prevents the shortcuts to be mapped with other keys like:

$mainMod = SUPER
bind = $mainMod,tab,hycov:toggleoverview

I suggest reading the equivalent of keycode 56 from the toggleoverview bind, so that it can be different from the Alt key

This doesn't seem to be a very high priority, I will support him when I have time, of course welcome to pr if you have time

The current plug-in interface does not support to find out what keys are bound to a command from the configuration, if you want to do this, you have to do a lot of work to parse the configuration file, and every time to parse it is too inefficient, I prefer to add an option to specify alternative keys in hycov config. like this:
hycov {
alt_release_key_replace = SUPER
}

done

image