xkeysnail icon indicating copy to clipboard operation
xkeysnail copied to clipboard

Show transformed keys in output

Open rbreaves opened this issue 3 years ago • 3 comments

Currently if a user presses a key that will be remapped xkeysnail just mentions the key pressed, not the key combo it is being transformed into. This update will append the transformed combo after "=>" if there is a transformed combo available for a specific condition and key combo.

WM_CLASS 'Gnome-terminal' | active keymaps = [Anonymous keymap, Anonymous keymap, terminals]
ENTER

WM_CLASS 'Sublime_text' | active keymaps = [Anonymous keymap, Anonymous keymap, Sublime Text]
RC-LEFT => HOME
WM_CLASS 'Sublime_text' | active keymaps = [Anonymous keymap, Anonymous keymap, Sublime Text]
RC-RIGHT => END
WM_CLASS 'Sublime_text' | active keymaps = [Anonymous keymap, Anonymous keymap, Sublime Text]
LShift-RC-LEFT => Shift-HOME
WM_CLASS 'Gnome-terminal' | active keymaps = [Anonymous keymap, Anonymous keymap, terminals]
RC-T => Shift-C-T
WM_CLASS 'Gnome-terminal' | active keymaps = [Anonymous keymap, Anonymous keymap, terminals]
RC-W => Shift-C-W

WM_CLASS 'Sublime_text' | active keymaps = [Anonymous keymap, Anonymous keymap, Sublime Text]
RC-A

rbreaves avatar Oct 27 '20 22:10 rbreaves

This doesn't work well when a keybinding is remapped to multiple key combinations, for example:

LM-LEFT => [<xkeysnail.key.Combo object at 0x7f2fced29850>, <xkeysnail.key.Combo object at 0x7f2fced82e80>]

OlegSmelov avatar Apr 09 '21 21:04 OlegSmelov

Hmmm.. hadn't tested against that, I am guessing then a check needs to be added to properly call & parse out that object type then.

rbreaves avatar Apr 10 '21 00:04 rbreaves

This doesn't work well when a keybinding is remapped to multiple key combinations, for example:

LM-LEFT => [<xkeysnail.key.Combo object at 0x7f2fced29850>, <xkeysnail.key.Combo object at 0x7f2fced82e80>]

I made a update and now problably will print all type of functions correctly: 046277b

luizoti avatar Apr 28 '21 00:04 luizoti