/* remove from the state the mask of the modifier key being released,
if it is a modifier key being released that is */
e->xkey.state &= ~modkeys_keycode_to_mask(e->xkey.keycode);
/* remove from the state the mask of the modifier key being released,
if it is a modifier key being released that is */
e->xkey.state &= ~modkeys_keycode_to_mask(e->xkey.keycode);
- else if (ev->type == KeyPress) {
- if (keycode == ob_keycode(OB_KEY_ESCAPE) && state == 0) {
+ /* Allow control while going thru the menu */
+ else if (ev->type == KeyPress && (state & ~ControlMask) == 0) {
+ if (keycode == ob_keycode(OB_KEY_ESCAPE)) {
/* Left goes to the parent menu */
menu_frame_select(frame, NULL, TRUE);
ret = TRUE;
}
/* Left goes to the parent menu */
menu_frame_select(frame, NULL, TRUE);
ret = TRUE;
}
get sent to the focused application.
Allow ControlMask only, and don't bother if the menu is empty */
get sent to the focused application.
Allow ControlMask only, and don't bother if the menu is empty */
if (keycode == ob_keycode(OB_KEY_RETURN)) {
/* Enter runs the active item or goes into the submenu.
Control-Enter runs it without closing the menu. */
if (keycode == ob_keycode(OB_KEY_RETURN)) {
/* Enter runs the active item or goes into the submenu.
Control-Enter runs it without closing the menu. */