Changed binding to toggle touch screen mode.
This commit is contained in:
1 parent
03066b2abe
commit
89043dc58b
3 files changed
+29
-3
No files matched your search
@@ -35,7 +35,7 @@ Integrated into `testing` from Chase Cichorz's three-commit touch patch.
|
||||
- Setting: `enable-touch-screen` in `[profiles.<name>.presentation.reading]`,
|
||||
default off. Preferences checkbox "Use the touch screen with gestures" and
|
||||
quick toggle "Touch screen".
|
||||
- Keyboard: `toggle-touch-screen`, Cthulhu+Ctrl+Alt+T (as NVDA+Ctrl+Alt+T),
|
||||
- Keyboard: `toggle-touch-screen`, Cthulhu+Ctrl+Shift+T,
|
||||
flips the quick toggle for the session and says "Touch screen on" or "off".
|
||||
Saving speech settings keeps it.
|
||||
|
||||
@@ -238,7 +238,7 @@ are failures and cancellation closes an outstanding command connection.
|
||||
|
||||
Before pushing, build from testing and check on the touchscreen:
|
||||
|
||||
1. Toggle with Cthulhu+Ctrl+Alt+T; explore, tap, double tap, rotate, and flick
|
||||
1. Toggle with Cthulhu+Ctrl+Shift+T; explore, tap, double tap, rotate, and flick
|
||||
through each mode. Check speech and Braille, including window boundaries.
|
||||
2. Unplug/reconnect or enable before connecting the device. It should become
|
||||
available after the retry interval. Toggle off/on; a double tap must not
|
||||
|
||||
@@ -220,7 +220,7 @@ func DefaultCommandBindings(layout KeyboardLayout) CommandBindings {
|
||||
{Symbol: upKeySymbol, Modifiers: 1, CthulhuModifier: true}: PresentCurrentLine,
|
||||
{Symbol: 's', Modifiers: controlModifier | 1, CthulhuModifier: true}: SaveSpeechSettings,
|
||||
{Symbol: 't', CthulhuModifier: true}: PresentTime,
|
||||
{Symbol: 't', Modifiers: controlModifier | altModifier, CthulhuModifier: true}: ToggleTouchScreen,
|
||||
{Symbol: 't', Modifiers: controlModifier | 1, CthulhuModifier: true}: ToggleTouchScreen,
|
||||
{Symbol: 'c', Modifiers: 1, CthulhuModifier: true}: PresentClipboard,
|
||||
{Symbol: 'h', Modifiers: controlModifier, CthulhuModifier: true}: ShowSpeechHistory,
|
||||
{Symbol: 'd', Modifiers: 1, CthulhuModifier: true}: ToggleSpeechMonitor,
|
||||
|
||||
@@ -358,3 +358,29 @@ func TestSpeechSettingBindings(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestTouchScreenShortcut(t *testing.T) {
|
||||
for _, layout := range []KeyboardLayout{DesktopKeyboardLayout, LaptopKeyboardLayout} {
|
||||
for _, browse := range []bool{false, true} {
|
||||
bindings, err := ResolveCommandBindings(layout, browse, nil)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for _, tc := range []struct {
|
||||
modifiers uint16
|
||||
want Command
|
||||
}{
|
||||
{controlModifier | 1, ToggleTouchScreen},
|
||||
{controlModifier | altModifier, ""},
|
||||
{0, PresentTime},
|
||||
} {
|
||||
router := NewCommandRouter([]uint32{0xff63}, bindings)
|
||||
router.Handle(0xff63, 118, 0, true)
|
||||
consumed, command := router.Handle('t', 28, tc.modifiers, true)
|
||||
if command != tc.want || consumed != (tc.want != "") {
|
||||
t.Fatalf("layout %v browse %v modifiers %d: got %v %q, want %q", layout, browse, tc.modifiers, consumed, command, tc.want)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user