Skip to content

Commit 8672bc3

Browse files
committed
fix NVDA now ignores enter, backspace and space when they are pressed with shift key.
add french translation, thanks to Rémy Ruiz. update es and en readmes to correct some document format and sections.
1 parent 265abd4 commit 8672bc3

File tree

6 files changed

+118
-14
lines changed

6 files changed

+118
-14
lines changed

addon/doc/es/readme.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,29 @@
22
Este complemento permite al usuario configurar a NVDA para pitar con algunos eventos de teclado.
33

44
Copyright (C) 2019 David CM <[email protected]>
5+
56
Este paquete es distribuido bajo los términos de la GNU General Public License, versión 2 o posterior.
67

78
## Características
8-
9-
Este complemento provee las siguientes características que puedes usar para adaptar el comportamiento de teclado de NVDA:
9+
Este complemento provee las siguientes características que puedes usar para adaptar el comportamiento de teclado de NVDA:
10+
1011
* Pitar para mayúsculas cuando el bloqueo mayúsculas está activado: si esta característica está habilitada, NVDA pitará cuando escribas una letra mayúscula y el bloqueo mayúsculas esté activo. ¡No cometa más errores de mayúsculas!
1112
* Pitar para caracteres escritos cuando la tecla shift es presionada: con esta característica NVDA pitará si escribes un carácter con la tecla shift presionada.
1213
* Pitar cuando cambia el estado de las teclas interruptores: con esta característica, NVDA producirá un tono alto cuando el interructor se activa, y uno bajo si se desactiva.
1314
* Anunciar el cambio de estado de las teclas interruptores: Solo para cuando "Pitar cuando cambia el estado de las teclas" está habilitado. Puedes habilitar o deshabilitar el anunciado de las teclas interruptores cuando estas cambian su estado.
1415

1516
## Requisitos
16-
Necesitarás NVDA 2018.2 o posterior.
17+
Necesitarás NVDA 2018.2 o posterior.
18+
19+
## Instalación
20+
Instala este complemento como cualquier otro.
21+
22+
## Uso
23+
Para desactivar o activar características, ve a las configuraciones de NVDA y selecciona la categoría beep keyboard. En esa categoría podrás habilitar o deshabilitar cualquier característica soportada por este complemento.
24+
"Pitar para mayúsculas cuando el bloqueo mayúsculas está activado" está habilitado por defecto.
25+
26+
## Empaquetar el complemento para su distribución
27+
  Abra una línea de comandos, cambie al directorio raíz del complemento y ejecute el comando scons. El complemento creado, si no hay errores, será puesto en la carpeta raíz del complemento.
1728

18-
##
19-
Instala este complemento como cualquier otro. para desactivar o activar características, ve a las configuraciones de NVDA y selecciona la categoría beep keyboard. En esa categoría podrás habilitar o deshabilitar cualquier característica soportada por este complemento.
20-
"Pitar para mayúsculas cuando el bloqueo mayúsculas está activado" está habilitado por defecto.
29+
## Notas:
30+
* Las herramientas scons y gettext de este proyecto son compatibles con python 3 únicamente. No funcionan en python 2.7

addon/doc/fr/readme.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Beep keyboard NVDA Add-on #
2+
Cette extension permet à l'utilisateur de configurer NVDA pour émettre des bips avec certains événements du clavier.
3+
4+
Copyright (C) 2019 David CM <[email protected]>
5+
6+
Ce paquet est distribué sous les termes de la licence publique générale GNU, version 2 ou ultérieure.
7+
8+
## Caractéristiques
9+
Cette extension fournit les fonctionnalités suivantes que vous pouvez utiliser pour adapter le comportement du clavier NVDA:
10+
11+
* Bip pour les majuscules quand le verrouillage majuscule est activé: si cette fonctionnalité est activée, NVDA émettra un bip lorsque vous tapez une lettre majuscule et que le verrouillage majuscule est activé. Ne faites plus d'erreurs de majuscules !
12+
* Bip pour les caractères saisis lorsque vous appuyez sur la touche maj: avec cette fonctionnalité, NVDA émettra un bip si vous tapez un caractère avec la touche maj enfoncée.
13+
* Beep quand l'état des touches de l'interrupteur à bascule change: avec cette fonctionnalité, NVDA émettra un bip plus aigu si l'interrupteur à bascule est activé et une tonalité plus grave s'il est désactivé.
14+
* Annoncer le changement de l'état des touches de l'interrupteur à bascule: uniquement lorsque l'option "Beep pendant le changement de l'état des touches de l'interrupteur à bascule" est activé. Vous pouvez activer ou désactiver l'annonce des touches de l'interrupteur à bascule lorsqu'elles changent d'état.
15+
16+
## Exigences
17+
Vous avez besoin de NVDA 2018.2 ou une version ultérieure.
18+
19+
## Installation
20+
Installez-le simplement comme n'importe quel extension NVDA.
21+
22+
## Utilisation
23+
Pour activer ou désactiver des fonctionnalités, accédez aux paramètres NVDA et sélectionnez la catégorie beep keyboard. Dans cette catégorie, vous pouvez configurer toutes les fonctionnalités prises en charge par l'extension.
24+
"Bip pour les majuscules quand le verrouillage majuscule est activé" est activé par défaut.
25+
26+
## Empaquetage de l'extension pour sa distribution
27+
Ouvrez une ligne de commande, changer le dossier racine de l'extension et exécutez la commande scons. L'extension créée, s'il n'y a pas d'erreur, sera placée dans le dossier racine de l'extension.
28+
29+
## Notes:
30+
* Les outils scons et gettext sur ce projet sont uniquement compatibles avec Python 3. Ils ne fonctionnent pas avec Python 2.7.

addon/globalPlugins/beepKeyboard.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ def onSave(self):
5555
config.configProfileSwitched.notify()
5656

5757

58-
5958
class GlobalPlugin(globalPluginHandler.GlobalPlugin):
6059
def __init__(self):
6160
super(globalPluginHandler.GlobalPlugin, self).__init__()
61+
self.ignoredCharactersForShift = "\t\b\r "
6262
gui.settingsDialogs.NVDASettingsDialog.categoryClasses.append(BeepKeyboardSettingsPanel)
6363
self.setExternalReportToggleStatus(config.conf['beepKeyboard']['beepToggleKeyChanges'])
6464
if hasattr(config, "post_configProfileSwitch"):
@@ -69,7 +69,7 @@ def __init__(self):
6969
def event_typedCharacter(self, obj, nextHandler, ch):
7070
nextHandler()
7171
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))):
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))):
7373
tones.beep(3000,40)
7474

7575
def setExternalReportToggleStatus(self, flag):
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# SOME DESCRIPTIVE TITLE.
2+
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3+
# This file is distributed under the same license as the 'beepKeyboard' package.
4+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5+
#
6+
msgid ""
7+
msgstr ""
8+
"Project-Id-Version: 'beepKeyboard' '0.1b1'\n"
9+
"Report-Msgid-Bugs-To: '[email protected]'\n"
10+
"POT-Creation-Date: 2019-04-13 20:16+0200\n"
11+
"PO-Revision-Date: 2019-04-13 20:44+0200\n"
12+
"Last-Translator: Rémy Ruiz <[email protected]>\n"
13+
"Language-Team: \n"
14+
"Language: fr\n"
15+
"MIME-Version: 1.0\n"
16+
"Content-Type: text/plain; charset=UTF-8\n"
17+
"Content-Transfer-Encoding: 8bit\n"
18+
"X-Generator: Poedit 1.8.12\n"
19+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
20+
21+
#. Translators: This is the label for the beepKeyboard settings category in NVDA Settings screen.
22+
#. Add-on summary, usually the user visible name of the addon.
23+
#. Translators: Summary for this add-on to be shown on installation and add-on information.
24+
#: addon\globalPlugins\beepKeyboard.py:30 buildVars.py:17
25+
msgid "Beep keyboard"
26+
msgstr "Beep keyboard"
27+
28+
#. Translators: label for a checkbox option in the settings panel.
29+
#: addon\globalPlugins\beepKeyboard.py:35
30+
msgid "Beep for uppercases when &caps lock is on"
31+
msgstr "Bip pour les majuscules quand le &verrouillage majuscule est activé"
32+
33+
#. Translators: label for a checkbox option in the settings panel.
34+
#: addon\globalPlugins\beepKeyboard.py:38
35+
msgid "Beep for typed characters when &shift is pressed"
36+
msgstr "Bip pour les caractères saisis lorsque vous appuyez sur la touche &maj"
37+
38+
#. Translators: label for a checkbox option in the settings panel.
39+
#: addon\globalPlugins\beepKeyboard.py:41
40+
msgid "Beep for &toggle keys changes"
41+
msgstr ""
42+
"Beep pendant le changement de l'état des &touches de l'interrupteur à bascule"
43+
44+
#. Translators: label for a checkbox option in the settings panel.
45+
#: addon\globalPlugins\beepKeyboard.py:44
46+
msgid ""
47+
"&Announce toggle keys changes (if Beep for toggle keys changes is disabled "
48+
"NVDA will have the original behavior)"
49+
msgstr ""
50+
"&Annoncer le changement de l'état des touches de l'interrupteur à bascule "
51+
"(si l'option \"Beep pendant le changement de l'état des touches de "
52+
"l'interrupteur à bascule\" est désactivé, NVDA aura le comportement "
53+
"d'origine)"
54+
55+
#. Add-on description
56+
#. Translators: Long description to be shown for this add-on on add-on information from add-ons manager
57+
#: buildVars.py:20
58+
msgid "This add-on beeps with some keyboard events."
59+
msgstr ""
60+
"Cette extension dit à NVDA d'émettre des bips avec certains événements du "
61+
"clavier."

buildVars.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# Translators: Long description to be shown for this add-on on add-on information from add-ons manager
2020
"addon_description" : _("""This add-on beeps with some keyboard events."""),
2121
# version
22-
"addon_version" : "0.1b2",
22+
"addon_version" : "0.1b3",
2323
# Author(s)
2424
"addon_author" : u"David CM <[email protected]>",
2525
# URL for the add-on documentation support

readme.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,25 @@ Copyright (C) 2019 David CM <[email protected]>
66
This package is distributed under the terms of the GNU General Public License, version 2 or later.
77

88
## Features
9+
This add-on provides the following features you can use to adapt NVDA keyboard behavior:
910

10-
This add-on provides the following features you can use to adapt NVDA keyboard behavior:
1111
* Beep for uppercases when caps lock is on: if this feature is enabled, NVDA will beep when you typing an uppercase and caps lock is on. Don't make any more uppercase mistakes!
1212
* Beep for typed characters when shift is pressed: with this feature NVDA will beep if you type a character with shift key pressed.
1313
* Beep for toggle keys changes: with this feature, NVDA will beep higher if a toggle key goes on, and lower tone if it goes off.
1414
* Announce toggle keys changes: just when "Beep for toggle keys changes" is on. You can enable or disable NVDA to announce toggle key status.
1515

1616
## Requirements
17-
You need NVDA 2018.2 or later.
17+
You need NVDA 2018.2 or later.
18+
19+
## Installation
20+
Just install it as a NVDA add-on.
1821

1922
## Usage
20-
To enable or disable features, go to NVDA settings and select beep keyboard category. In that category you can configure all supported features by this add-on.
21-
"Beep for uppercases when caps lock is on" is enabled by default.
23+
To enable or disable features, go to NVDA settings and select beep keyboard category. In that category you can configure all supported features by this add-on.
24+
"Beep for uppercases when caps lock is on" is enabled by default.
2225

2326
## Packaging it for distribution
24-
Open a command line, change to the Add-on root folder and run the scons command. The created add-on, if there were no errors, is placed in the root directory.
27+
Open a command line, change to the Add-on root folder and run the scons command. The created add-on, if there were no errors, is placed in the root directory.
2528

2629
## Notes
2730
* scons and gettext tools on this project are compatible with python 3 only. Doesn't work with python 2.7.

0 commit comments

Comments
 (0)