Gnome/metacity keybinding won't permit program to wait for a keystroke,
I have a little GUI utility written in C that requires the user to press a key to make a menu selection. The code is predictably simple:
save_ID = getchar();
'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?
|All times are GMT -5. The time now is 06:59 AM.|