Artificial intelligent assistant

How to bind. Tab solely = Tab, but Tab with other key = WinKey + other key I want to remap my `Tab` key so when it clicked solely without any extra keys it will acts as Tab as usualy, but when I combine it with other keys like `Tab`+`j` it will behave like `Win`. TAB = TAB (pressed solely) TAB + (any_key) = WIN_KEY + (any_key) Which tool I should use for this?

@Goro in his reply listed good tools to recognize pressed key such a **xev**. But the second part of his answer wasn't what I was looking for.

I wanted to change the behavior of `Tab` not `Windows` key. For example to activate script in i3 window manager to change window I can press `Tab` \+ 1 to switch to the first screen. `Win` \+ `1` (default). But I can still use `Tab` to make an indention if I press it solely.

What I did to make it works was using **xmodmap** and **xcape**.


spare_modifier="Super_L"
echo $spare_modifier
xmodmap -e "keycode 23 = $spare_modifier"
xmodmap -e "remove mod4 = $spare_modifier"
xmodmap -e "add Win = $spare_modifier"
xmodmap -e "add mod4 = $spare_modifier"
xmodmap -e "keycode any = Tab"
xcape -e "$spare_modifier=Tab"

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 9b68f7e089e8b5e927ee41c071f9b6dd