From d99c3ee6bd860c062118031f0414df85812604e4 Mon Sep 17 00:00:00 2001 From: Julien Cochuyt Date: Wed, 24 Jun 2020 02:34:00 +0200 Subject: [PATCH 1/5] Touch interaction: Add a global command to toggle support (Follow-up of #10557) --- source/globalCommands.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/source/globalCommands.py b/source/globalCommands.py index d860efcb9ff..13db23ca7c3 100755 --- a/source/globalCommands.py +++ b/source/globalCommands.py @@ -2408,6 +2408,29 @@ def script_navigatorObject_previousInFlow(self,gesture): script_navigatorObject_previousInFlow.__doc__=_("Moves to the previous object in a flattened view of the object navigation hierarchy") script_navigatorObject_previousInFlow.category=SCRCAT_OBJECTNAVIGATION + @script( + # Translators: Describes a command. + description=_("Toggles on and off the support of touch interaction"), + category=SCRCAT_TOUCH, + gesture="kb:NVDA+shift+t", + ) + def script_toggleTouchSupport(self, gesture): + enabled = not bool(config.conf["touch"]["enabled"]) + try: + touchHandler.setTouchSupport(enabled) + except NotImplementedError: + # Translators: Presented when attempting to toggle touch interaction support + ui.message(_("Touch interaction not supported")) + return + # Set configuration upon success + config.conf["touch"]["enabled"] = enabled + if enabled: + # Translators: Presented when support of touch interaction has been enabled + ui.message(_("Touch interaction enabled")) + else: + # Translators: Presented when support of touch interaction has been disabled + ui.message(_("Touch interaction disabled")) + def script_touch_changeMode(self,gesture): mode=touchHandler.handler._curTouchMode index=touchHandler.availableTouchModes.index(mode) From c535b4a9993256ccaebba98ed4df711ccb489dbc Mon Sep 17 00:00:00 2001 From: Julien Cochuyt Date: Sat, 27 Jun 2020 08:51:30 +0200 Subject: [PATCH 2/5] Touch interaction: Toggle support command: Change default binding to `NVDA+alt+t` Re: https://github.com/nvaccess/nvda/pull/11297#issuecomment-650507773 --- source/globalCommands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/globalCommands.py b/source/globalCommands.py index 13db23ca7c3..98d081e52d7 100755 --- a/source/globalCommands.py +++ b/source/globalCommands.py @@ -2412,7 +2412,7 @@ def script_navigatorObject_previousInFlow(self,gesture): # Translators: Describes a command. description=_("Toggles on and off the support of touch interaction"), category=SCRCAT_TOUCH, - gesture="kb:NVDA+shift+t", + gesture="kb:NVDA+alt+t", ) def script_toggleTouchSupport(self, gesture): enabled = not bool(config.conf["touch"]["enabled"]) From 7eccadbe92a6be498ff840556ca6d53d89f02b1c Mon Sep 17 00:00:00 2001 From: Julien Cochuyt Date: Sat, 27 Jun 2020 09:49:38 +0200 Subject: [PATCH 3/5] Touch interaction: Toggle support command: Update documentation Re: - https://github.com/nvaccess/nvda/pull/11297#pullrequestreview-436287825 - https://github.com/nvaccess/nvda/pull/11297#pullrequestreview-436683872 --- user_docs/en/userGuide.t2t | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/user_docs/en/userGuide.t2t b/user_docs/en/userGuide.t2t index 57f2eb93ca7..5e44d431126 100644 --- a/user_docs/en/userGuide.t2t +++ b/user_docs/en/userGuide.t2t @@ -205,7 +205,10 @@ If your laptop cannot do this or does not allow you to turn Num Lock off, you ma If you are running NVDA on a device with a touchscreen and running Windows 8 or higher, you can also control NVDA directly via touch commands. While NVDA is running, unless touch interaction support is disabled, all touch input will go directly to NVDA. Therefore, actions that can be performed normally without NVDA will not work. -You can change this by enabling or disabling [touch interaction support # TouchSupportEnable] from touch interaction category of the NVDA settings. +%kc:beginInclude +To toggle touch interaction support on and off, press NVDA+alt+t. +%kc:endInclude +You can also enable or disable [touch interaction support #TouchSupportEnable] from the Touch Interaction category of the NVDA settings. +++ Exploring the Screen +++[ExploringTheScreen] The most basic action you can perform with the touch screen is to announce the control or text at any point on the screen. @@ -216,6 +219,8 @@ You can also keep your finger on the screen and move it around to read other con When NVDA commands are described later in this user guide, they may list a touch gesture which can be used to activate that command with the touchscreen. Following are some instructions on how to perform the various touch gestures. + + ==== Taps ==== Tap the screen quickly with one or more fingers. @@ -1524,6 +1529,7 @@ This category contains the following options: This checkbox enables NVDA's touch interaction support. If enabled, you can use your fingers to navigate and interact with items on screen using a touchscreen device. If disabled, touchscreen support will be disabled as though NVDA is not running. +This setting can also be toggled on and off using NVDA+alt+t. ==== Touch typing mode ====[TouchTypingMode] This checkbox allows you to specify the method you wish to use when entering text using the touch keyboard. From 371d141f324ff524ab57823181ba86b08779e6a3 Mon Sep 17 00:00:00 2001 From: Julien Cochuyt Date: Tue, 30 Jun 2020 02:30:41 +0200 Subject: [PATCH 4/5] Review action https://github.com/nvaccess/nvda/pull/11297#issuecomment-651438234 --- source/globalCommands.py | 2 +- user_docs/en/userGuide.t2t | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/globalCommands.py b/source/globalCommands.py index 98d081e52d7..320c1997787 100755 --- a/source/globalCommands.py +++ b/source/globalCommands.py @@ -2410,7 +2410,7 @@ def script_navigatorObject_previousInFlow(self,gesture): @script( # Translators: Describes a command. - description=_("Toggles on and off the support of touch interaction"), + description=_("Toggles the support of touch interaction"), category=SCRCAT_TOUCH, gesture="kb:NVDA+alt+t", ) diff --git a/user_docs/en/userGuide.t2t b/user_docs/en/userGuide.t2t index 5e44d431126..800bacbd3cf 100644 --- a/user_docs/en/userGuide.t2t +++ b/user_docs/en/userGuide.t2t @@ -206,7 +206,7 @@ If you are running NVDA on a device with a touchscreen and running Windows 8 or While NVDA is running, unless touch interaction support is disabled, all touch input will go directly to NVDA. Therefore, actions that can be performed normally without NVDA will not work. %kc:beginInclude -To toggle touch interaction support on and off, press NVDA+alt+t. +To toggle touch interaction support, press NVDA+alt+t. %kc:endInclude You can also enable or disable [touch interaction support #TouchSupportEnable] from the Touch Interaction category of the NVDA settings. @@ -1529,7 +1529,7 @@ This category contains the following options: This checkbox enables NVDA's touch interaction support. If enabled, you can use your fingers to navigate and interact with items on screen using a touchscreen device. If disabled, touchscreen support will be disabled as though NVDA is not running. -This setting can also be toggled on and off using NVDA+alt+t. +This setting can also be toggled using NVDA+alt+t. ==== Touch typing mode ====[TouchTypingMode] This checkbox allows you to specify the method you wish to use when entering text using the touch keyboard. From 55c30378ba5df8d4e625826d4e05af92d2cfe5ad Mon Sep 17 00:00:00 2001 From: Julien Cochuyt Date: Tue, 30 Jun 2020 02:35:21 +0200 Subject: [PATCH 5/5] Touch interaction: Toggle support command: Change default binding to `NVDA+control+alt+t Re: https://github.com/nvaccess/nvda/pull/11297#issuecomment-650532652 --- source/globalCommands.py | 2 +- user_docs/en/userGuide.t2t | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/globalCommands.py b/source/globalCommands.py index 320c1997787..f1357c4e136 100755 --- a/source/globalCommands.py +++ b/source/globalCommands.py @@ -2412,7 +2412,7 @@ def script_navigatorObject_previousInFlow(self,gesture): # Translators: Describes a command. description=_("Toggles the support of touch interaction"), category=SCRCAT_TOUCH, - gesture="kb:NVDA+alt+t", + gesture="kb:NVDA+control+alt+t", ) def script_toggleTouchSupport(self, gesture): enabled = not bool(config.conf["touch"]["enabled"]) diff --git a/user_docs/en/userGuide.t2t b/user_docs/en/userGuide.t2t index 800bacbd3cf..cbea0196aa8 100644 --- a/user_docs/en/userGuide.t2t +++ b/user_docs/en/userGuide.t2t @@ -206,7 +206,7 @@ If you are running NVDA on a device with a touchscreen and running Windows 8 or While NVDA is running, unless touch interaction support is disabled, all touch input will go directly to NVDA. Therefore, actions that can be performed normally without NVDA will not work. %kc:beginInclude -To toggle touch interaction support, press NVDA+alt+t. +To toggle touch interaction support, press NVDA+control+alt+t. %kc:endInclude You can also enable or disable [touch interaction support #TouchSupportEnable] from the Touch Interaction category of the NVDA settings. @@ -1529,7 +1529,7 @@ This category contains the following options: This checkbox enables NVDA's touch interaction support. If enabled, you can use your fingers to navigate and interact with items on screen using a touchscreen device. If disabled, touchscreen support will be disabled as though NVDA is not running. -This setting can also be toggled using NVDA+alt+t. +This setting can also be toggled using NVDA+control+alt+t. ==== Touch typing mode ====[TouchTypingMode] This checkbox allows you to specify the method you wish to use when entering text using the touch keyboard.