Keynav works flawlessly
This commit is contained in:
@@ -69,13 +69,15 @@ func (window *Window) handleKeyPress (
|
||||
}
|
||||
|
||||
if key == tomo.KeyTab && modifiers.Alt {
|
||||
if _, ok := window.child.(tomo.Selectable); ok {
|
||||
if child, ok := window.child.(tomo.Selectable); ok {
|
||||
direction := tomo.SelectionDirectionForward
|
||||
if modifiers.Shift {
|
||||
direction = tomo.SelectionDirectionBackward
|
||||
}
|
||||
|
||||
window.advanceSelectionInChild(direction)
|
||||
if !child.HandleSelection(direction) {
|
||||
child.HandleDeselection()
|
||||
}
|
||||
}
|
||||
} else if child, ok := window.child.(tomo.KeyboardTarget); ok {
|
||||
// FIXME: pass correct value for repeated
|
||||
@@ -83,17 +85,6 @@ func (window *Window) handleKeyPress (
|
||||
}
|
||||
}
|
||||
|
||||
func (window *Window) advanceSelectionInChild (direction tomo.SelectionDirection) {
|
||||
child := window.child.(tomo.Selectable)
|
||||
if child.Selected() {
|
||||
if !child.HandleSelection(direction) {
|
||||
child.HandleDeselection()
|
||||
}
|
||||
} else {
|
||||
child.HandleSelection(tomo.SelectionDirectionNeutral)
|
||||
}
|
||||
}
|
||||
|
||||
func (window *Window) handleKeyRelease (
|
||||
connection *xgbutil.XUtil,
|
||||
event xevent.KeyReleaseEvent,
|
||||
|
||||
Reference in New Issue
Block a user