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

Window Keyboard event handler - pass keyboard events to child windows #55

Open
goblinfactory opened this issue Jan 24, 2020 · 0 comments
Assignees
Labels
feature request version 8 planned for version 8

Comments

@goblinfactory
Copy link
Owner

Any window must be able to start monitoring keystrokes, and keep track of active child windows that any keyboard commands are then passed to.

e.g.

var scores = window.OpenBox("scores", 50,20); 
scores.Run();

The default keystroke to move between active windows that have tab sequence number is the Tab key, but this can be overridden. When used in conjuction with multi-inputs (form input) then tab no longer moves between individual inputs, that will be left to the arrow keys or enter key.

  • Windows that can be tracked are windows open will be static Open or Split methods.
  • Pressing tab moves between active windows.
  • Active window is indicated by theme, default theme will be double line for active window, brightWhite on black, and inactive will be gray on black single Line.

Example

var parentWindow = new Window();
var teamA = parentWindow.SplitLeft("team A");
var teamB = parentWindow.splitRight("team B");
var getNames = GetNameInputs(); // returns an array of ReadLine();
teamA.Add(getNames);
teamB.Add(getNames);
parentWindow.Run();

Calling Run, will cause first window to have focus, and all keyboard events are sent to the controls inside that window. Pressing tab, will switch focus between the two window objects, teamA and teamB, and will cause each window to change their style indicating selection.

@goblinfactory goblinfactory self-assigned this Jan 24, 2020
@goblinfactory goblinfactory changed the title Window Keyboard manager - pass keyboard events to child windows Window Keyboard event handler - pass keyboard events to child windows Jan 24, 2020
@goblinfactory goblinfactory added the version 8 planned for version 8 label Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request version 8 planned for version 8
Projects
None yet
Development

No branches or pull requests

1 participant