Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cycle through the windows with the arrow keys #28

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions openbox/actions/cyclewindows.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,22 @@ static gboolean i_input_func(guint initial_state,
o->state = e->xkey.state;
return FALSE;
}

/* Cycle through the windows with the arrow keys */
else if (sym == XK_Down || sym == XK_Right) {
gboolean forward = o->forward;
o->forward = TRUE;
run_func(NULL, o);
o->forward = forward;
return TRUE;
}
else if (sym == XK_Up || sym == XK_Left) {
gboolean forward = o->forward;
o->forward = FALSE;
run_func(NULL, o);
o->forward = forward;
return TRUE;
}

/* There were no modifiers and they pressed enter */
else if ((sym == XK_Return || sym == XK_KP_Enter) && !initial_mods) {
Expand Down