• R/O
  • HTTP
  • SSH
  • HTTPS

nvdajp: Commit

NVDA with Japanese branch


Commit MetaInfo

Révision95164afb91bca1c64b062944ead1babf93d827b4 (tree)
l'heure2013-03-09 15:04:23
AuteurJames Teh <jamie@jant...>
CommiterJames Teh

Message de Log

hims driver: Support braille input.
Fixes #3028.

Change Summary

Modification

--- a/source/brailleDisplayDrivers/hims/__init__.py
+++ b/source/brailleDisplayDrivers/hims/__init__.py
@@ -2,7 +2,7 @@
22 #A part of NonVisual Desktop Access (NVDA)
33 #This file is covered by the GNU General Public License.
44 #See the file COPYING for more details.
5-#Copyright (C) 2010-2012 Gianluca Casalino, NV Access Limited
5+#Copyright (C) 2010-2013 Gianluca Casalino, NV Access Limited
66
77 from logHandler import log
88 from ctypes import *
@@ -11,6 +11,7 @@ import braille
1111 import inputCore
1212 from winUser import WNDCLASSEXW, WNDPROC, LRESULT, HCURSOR
1313 import hwPortUtils
14+from brailleInput import BrailleInputGesture
1415
1516 HIMS_KEYPRESSED = 0x01
1617 HIMS_KEYRELEASED = 0x02
@@ -59,6 +60,7 @@ HIMS_KEYS = {
5960 0x400000: 'Advance7',
6061 0x800000: 'Advance8'
6162 }
63+SPACE_KEY = 0x100
6264
6365 pressedKeys = set()
6466 _ignoreKeyPresses = False
@@ -204,7 +206,7 @@ class BrailleDisplayDriver(braille.BrailleDisplayDriver):
204206 }
205207 })
206208
207-class InputGesture(braille.BrailleDisplayGesture):
209+class InputGesture(braille.BrailleDisplayGesture, BrailleInputGesture):
208210 source = BrailleDisplayDriver.name
209211 def __init__(self, keys):
210212 super(InputGesture, self).__init__()
@@ -214,7 +216,18 @@ class InputGesture(braille.BrailleDisplayGesture):
214216 return
215217 self.keyCodes = set(keys)
216218 names = set()
219+ isBrailleInput = True
217220 for value in self.keyCodes:
221+ if isBrailleInput:
222+ if 0xff & value:
223+ self.dots |= value
224+ elif value == SPACE_KEY:
225+ self.space = True
226+ else:
227+ # This is not braille input.
228+ isBrailleInput = False
229+ self.dots = 0
230+ self.space = False
218231 try:
219232 name = HIMS_KEYS[value]
220233 if isinstance(name, dict):
--- a/user_docs/en/userGuide.t2t
+++ b/user_docs/en/userGuide.t2t
@@ -1401,8 +1401,6 @@ Please see the display's documentation for descriptions of where these keys can
14011401 NVDA supports Braille Sense and Braille EDGE displays from [Hims http://www.hims-inc.com/] when connected via USB or bluetooth.
14021402 If connecting via USB, you will need to install the USB drivers from HIMS on your system.
14031403
1404-Braille input is not yet supported.
1405-
14061404 Following are the key assignments for these displays with NVDA.
14071405 Please see the display's documentation for descriptions of where these keys can be found.
14081406 %kc:beginInclude
Afficher sur ancien navigateur de dépôt.