Gnome/metacity keybinding won't permit program to wait for a keystroke,
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
'getchar()' grabs the keystroke and the two 'system' lines make it so that it doesn't need to wait for ENTER. It works fine from the command line, however, when I bind the command to a hotkey in Gnome with metacity, it waits for the keystroke alright, but the keystroke then seems to be processed not as as input to the command as it should, but as if it were a separate command. Eg. if my keystroke is "1" and I'm in a terminal I see:
"zsh: command not found: 1"
A non-interactive version of the program works fine when bound to a hotkey, so the program is basically functional, it just can't be used interactively when called via a hotkey. Is there anything I can do about this? If metacity won't cooperate, is there some other macro/hotkey utility that would grab the keystroke properly?