Sometimes, when I use synergy between my machines when one is using full-screen VirtualBox guest I get stuck with some weird key modifiers turned on. If they exist on my keyboard (like Shift_L) I can just tap it and their status is reset and I can continue typing in small letters. But some of them are not mapped to my keyboard at all (like ISO_Level3_Shift), so I have no means of turning them off at all!How to reset them? Right now, all I can do is to reboot the computer, but it's rather  embarrassing solution. All I want is some program that can artificially tap all possible keyboard modifiers, so their status would be reset. Can it be done? I use Mint 14 (a clone of Ubuntu 12.10 Quantal).
How to force release of a keyboard modifiers
xorg;linux mint;keyboard;virtualbox;synergy
If you have xdotool installed, you could just simply usexdotool keyup ISO_Level3_ShiftWhich sends a key release (for ISO_Level3_Shift, of course) event to the X server.But you wanted a program to release all modifier keys.One could use xdotool to achieve that easily, if not for that I have no idea what modifier keysyms are defined. One possible method of finding them is to parse keysymdef.h:grep '^#define' /usr/include/X11/keysymdef.h | sed -r 's/^#define XK_(\S*?).*$/\1/;' | grep -E '_(L|R|Level.*)$'Which returns some keysyms that surely are modifiers. Unfortunately, I can't find any precise definition of a modifier key right now, so I don't know whether that's a complete list.Appending | xargs xdotool keyup to the above pipeline will release all those keys. On my system, it executes the following command:xdotool keyup Shift_L Shift_R Control_L Control_R Meta_L Meta_R Alt_L Alt_R Super_L Super_R Hyper_L Hyper_R ISO_Level2_Latch ISO_Level3_Shift ISO_Level3_Latch ISO_Level3_Lock ISO_Level5_Shift ISO_Level5_Latch ISO_Level5_Lock