Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

Commit

Permalink
Focus movement only by using TAB
Browse files Browse the repository at this point in the history
Removed arrow keys from focus movement. Only use TAB and Shift-TAB to
move focus.

That way widgets don’t accidentally lose focus when cursor is moved to
their „end“ using arrow keys.
  • Loading branch information
ralfw authored and alexischr committed Mar 10, 2017
1 parent aa43269 commit 36009e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gui.cs
Expand Up @@ -2903,11 +2903,11 @@ static void ProcessChar (Container container)
//
// Focus handling
//
if (ch == Keys.Tab || ch == Curses.KeyDown || ch == Curses.KeyRight){
if (ch == Keys.Tab){
if (!container.FocusNext ())
container.FocusNext ();
Curses.refresh ();
} else if (ch == Keys.ShiftTab || ch == Curses.KeyUp || ch == Curses.KeyLeft){
} else if (ch == Keys.ShiftTab){
if (!container.FocusPrev ())
container.FocusPrev ();
Curses.refresh ();
Expand Down

0 comments on commit 36009e3

Please sign in to comment.