Skip to content

Commit 8076ceb

Browse files
committed
add now the beep for typed characters with shift is distinct from the beep when caps lock is on.
1 parent 8672bc3 commit 8076ceb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

addon/globalPlugins/beepKeyboard.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ def onSave(self):
5454
else:
5555
config.configProfileSwitched.notify()
5656

57-
5857
class GlobalPlugin(globalPluginHandler.GlobalPlugin):
5958
def __init__(self):
6059
super(globalPluginHandler.GlobalPlugin, self).__init__()
@@ -68,9 +67,10 @@ def __init__(self):
6867

6968
def event_typedCharacter(self, obj, nextHandler, ch):
7069
nextHandler()
71-
if ((config.conf['beepKeyboard']['beepUpperWithCapsLock'] and winUser.getKeyState(winUser.VK_CAPITAL)&1 and ch.isupper())
72-
or (config.conf['beepKeyboard']['beepCharacterWithShift'] and (winUser.getKeyState(winUser.VK_LSHIFT) &32768 or winUser.getKeyState(winUser.VK_RSHIFT) &32768) and ch not in self.ignoredCharactersForShift and not (config.conf["keyboard"]["beepForLowercaseWithCapslock"] and ch.islower() and winUser.getKeyState(winUser.VK_CAPITAL)&1))):
70+
if config.conf['beepKeyboard']['beepUpperWithCapsLock'] and winUser.getKeyState(winUser.VK_CAPITAL)&1 and ch.isupper():
7371
tones.beep(3000,40)
72+
elif config.conf['beepKeyboard']['beepCharacterWithShift'] and (winUser.getKeyState(winUser.VK_LSHIFT) &32768 or winUser.getKeyState(winUser.VK_RSHIFT) &32768) and ch not in self.ignoredCharactersForShift and not (config.conf["keyboard"]["beepForLowercaseWithCapslock"] and ch.islower() and winUser.getKeyState(winUser.VK_CAPITAL)&1):
73+
tones.beep(6000, 10, 30, 30)
7474

7575
def setExternalReportToggleStatus(self, flag):
7676
if flag:

0 commit comments

Comments
 (0)