diff --git a/apps/code/catalog.de.i18n b/apps/code/catalog.de.i18n index bb4c19947..799ed9413 100644 --- a/apps/code/catalog.de.i18n +++ b/apps/code/catalog.de.i18n @@ -109,6 +109,52 @@ PythonBatteryIscharging = "Gibt zurück, ob die Batterie geladen wird" PythonSetBrightness = "Helligkeitsstufe festlegen" PythonGetBrightness = "Helligkeitsstufe abrufen" PythonKandinskyFunction = "Kandinsky-Modul Funktionspräfix" +PythonKeyLeft = "LEFT ARROW key" +PythonKeyUp = "UP ARROW key" +PythonKeyDown = "DOWN ARROW key" +PythonKeyRight = "RIGHT ARROW key" +PythonKeyOk = "OK key" +PythonKeyBack = "BACK key" +PythonKeyHome = "HOME key" +PythonKeyOnOff = "ON/OFF key" +PythonKeyShift = "SHIFT key" +PythonKeyAlpha = "ALPHA key" +PythonKeyXnt = "X,N,T key" +PythonKeyVar = "VAR key" +PythonKeyToolbox = "TOOLBOX key" +PythonKeyBackspace = "BACKSPACE key" +PythonKeyExp = "EXPONENTIAL key" +PythonKeyLn = "NATURAL LOGARITHM key" +PythonKeyLog = "DECIMAL LOGARITHM key" +PythonKeyImaginary = "IMAGINARY I key" +PythonKeyComma = "COMMA key" +PythonKeyPower = "POWER key" +PythonKeySine = "SINE key" +PythonKeyCosine = "COSINE key" +PythonKeyTangent = "TANGENT key" +PythonKeyPi = "PI key" +PythonKeySqrt = "SQUARE ROOT key" +PythonKeySquare = "SQUARE key" +PythonKeySeven = "7 key" +PythonKeyEight = "8 key" +PythonKeyNine = "9 key" +PythonKeyLeftParenthesis = "LEFT PARENTHESIS key" +PythonKeyRightParenthesis = "RIGHT PARENTHESIS key" +PythonKeyFour = "4 key" +PythonKeyFive = "5 key" +PythonKeySix = "6 key" +PythonKeyMultiplication = "MULTIPLICATION key" +PythonKeyDivision = "DIVISION key" +PythonKeyOne = "1 key" +PythonKeyTwo = "2 key" +PythonKeyThree = "3 key" +PythonKeyPlus = "PLUS key" +PythonKeyMinus = "MINUS key" +PythonKeyZero = "0 key" +PythonKeyDot = "DOT key" +PythonKeyEe = "10 POWER X key" +PythonKeyAns = "ANS key" +PythonKeyExe = "EXE key" PythonLdexp = "Liefert x*(2**i), Inverse von frexp" PythonLength = "Länge eines Objekts" PythonLgamma = "Log-Gamma-Funktion" diff --git a/apps/code/catalog.en.i18n b/apps/code/catalog.en.i18n index 7241ff9b1..af439aeb8 100644 --- a/apps/code/catalog.en.i18n +++ b/apps/code/catalog.en.i18n @@ -95,6 +95,52 @@ PythonSetBrightness = "Set brightness level" PythonGetBrightness = "Get brightness level" PythonIsNaN = "Check if x is a NaN" PythonKandinskyFunction = "kandinsky module function prefix" +PythonKeyLeft = "LEFT ARROW key" +PythonKeyUp = "UP ARROW key" +PythonKeyDown = "DOWN ARROW key" +PythonKeyRight = "RIGHT ARROW key" +PythonKeyOk = "OK key" +PythonKeyBack = "BACK key" +PythonKeyHome = "HOME key" +PythonKeyOnOff = "ON/OFF key" +PythonKeyShift = "SHIFT key" +PythonKeyAlpha = "ALPHA key" +PythonKeyXnt = "X,N,T key" +PythonKeyVar = "VAR key" +PythonKeyToolbox = "TOOLBOX key" +PythonKeyBackspace = "BACKSPACE key" +PythonKeyExp = "EXPONENTIAL key" +PythonKeyLn = "NATURAL LOGARITHM key" +PythonKeyLog = "DECIMAL LOGARITHM key" +PythonKeyImaginary = "IMAGINARY I key" +PythonKeyComma = "COMMA key" +PythonKeyPower = "POWER key" +PythonKeySine = "SINE key" +PythonKeyCosine = "COSINE key" +PythonKeyTangent = "TANGENT key" +PythonKeyPi = "PI key" +PythonKeySqrt = "SQUARE ROOT key" +PythonKeySquare = "SQUARE key" +PythonKeySeven = "7 key" +PythonKeyEight = "8 key" +PythonKeyNine = "9 key" +PythonKeyLeftParenthesis = "LEFT PARENTHESIS key" +PythonKeyRightParenthesis = "RIGHT PARENTHESIS key" +PythonKeyFour = "4 key" +PythonKeyFive = "5 key" +PythonKeySix = "6 key" +PythonKeyMultiplication = "MULTIPLICATION key" +PythonKeyDivision = "DIVISION key" +PythonKeyOne = "1 key" +PythonKeyTwo = "2 key" +PythonKeyThree = "3 key" +PythonKeyPlus = "PLUS key" +PythonKeyMinus = "MINUS key" +PythonKeyZero = "0 key" +PythonKeyDot = "DOT key" +PythonKeyEe = "10 POWER X key" +PythonKeyAns = "ANS key" +PythonKeyExe = "EXE key" PythonLdexp = "Return x*(2**i), inverse of frexp" PythonLength = "Length of an object" PythonLgamma = "Log-gamma function" diff --git a/apps/code/catalog.es.i18n b/apps/code/catalog.es.i18n index 4bc9eb2dc..c7d94d3f4 100644 --- a/apps/code/catalog.es.i18n +++ b/apps/code/catalog.es.i18n @@ -95,6 +95,52 @@ PythonSetBrightness = "Establecer nivel de brillo" PythonGetBrightness = "Obtener nivel de brillo" PythonIsNaN = "Check if x is a NaN" PythonKandinskyFunction = "kandinsky module function prefix" +PythonKeyLeft = "LEFT ARROW key" +PythonKeyUp = "UP ARROW key" +PythonKeyDown = "DOWN ARROW key" +PythonKeyRight = "RIGHT ARROW key" +PythonKeyOk = "OK key" +PythonKeyBack = "BACK key" +PythonKeyHome = "HOME key" +PythonKeyOnOff = "ON/OFF key" +PythonKeyShift = "SHIFT key" +PythonKeyAlpha = "ALPHA key" +PythonKeyXnt = "X,N,T key" +PythonKeyVar = "VAR key" +PythonKeyToolbox = "TOOLBOX key" +PythonKeyBackspace = "BACKSPACE key" +PythonKeyExp = "EXPONENTIAL key" +PythonKeyLn = "NATURAL LOGARITHM key" +PythonKeyLog = "DECIMAL LOGARITHM key" +PythonKeyImaginary = "IMAGINARY I key" +PythonKeyComma = "COMMA key" +PythonKeyPower = "POWER key" +PythonKeySine = "SINE key" +PythonKeyCosine = "COSINE key" +PythonKeyTangent = "TANGENT key" +PythonKeyPi = "PI key" +PythonKeySqrt = "SQUARE ROOT key" +PythonKeySquare = "SQUARE key" +PythonKeySeven = "7 key" +PythonKeyEight = "8 key" +PythonKeyNine = "9 key" +PythonKeyLeftParenthesis = "LEFT PARENTHESIS key" +PythonKeyRightParenthesis = "RIGHT PARENTHESIS key" +PythonKeyFour = "4 key" +PythonKeyFive = "5 key" +PythonKeySix = "6 key" +PythonKeyMultiplication = "MULTIPLICATION key" +PythonKeyDivision = "DIVISION key" +PythonKeyOne = "1 key" +PythonKeyTwo = "2 key" +PythonKeyThree = "3 key" +PythonKeyPlus = "PLUS key" +PythonKeyMinus = "MINUS key" +PythonKeyZero = "0 key" +PythonKeyDot = "DOT key" +PythonKeyEe = "10 POWER X key" +PythonKeyAns = "ANS key" +PythonKeyExe = "EXE key" PythonLdexp = "Return x*(2**i), inverse of frexp" PythonLength = "Length of an object" PythonLgamma = "Log-gamma function" diff --git a/apps/code/catalog.fr.i18n b/apps/code/catalog.fr.i18n index c43c9a2c2..aae8345d3 100644 --- a/apps/code/catalog.fr.i18n +++ b/apps/code/catalog.fr.i18n @@ -95,6 +95,52 @@ PythonSetBrightness = "Définir le niveau de luminosité" PythonGetBrightness = "Obtenir le niveau de luminosité" PythonIsNaN = "Teste si x est NaN" PythonKandinskyFunction = "Préfixe fonction module kandinsky" +PythonKeyLeft = "Touche FLECHE GAUCHE" +PythonKeyUp = "Touche FLECHE HAUT" +PythonKeyDown = "Touche FLECHE BAS" +PythonKeyRight = "Touche FLECHE DROITE" +PythonKeyOk = "Touche OK" +PythonKeyBack = "Touche RETOUR" +PythonKeyHome = "Touche HOME" +PythonKeyOnOff = "Touche ON/OFF" +PythonKeyShift = "Touche SHIFT" +PythonKeyAlpha = "Touche ALPHA" +PythonKeyXnt = "Touche X,N,T" +PythonKeyVar = "Touche VAR" +PythonKeyToolbox = "Touche BOITE A OUTILS" +PythonKeyBackspace = "Touche EFFACER" +PythonKeyExp = "Touche EXPONENTIELLE" +PythonKeyLn = "Touche LOGARITHME NEPERIEN" +PythonKeyLog = "Touche LOGARITHME DECIMAL" +PythonKeyImaginary = "Touche I IMAGINAIRE" +PythonKeyComma = "Touche VIRGULE" +PythonKeyPower = "Touche PUISSANCE" +PythonKeySine = "Touche SINUS" +PythonKeyCosine = "Touche COSINUS" +PythonKeyTangent = "Touche TANGENTE" +PythonKeyPi = "Touche PI" +PythonKeySqrt = "Touche RACINE CARREE" +PythonKeySquare = "Touche CARRE" +PythonKeySeven = "Touche 7" +PythonKeyEight = "Touche 8" +PythonKeyNine = "Touche 9" +PythonKeyLeftParenthesis = "Touche PARENTHESE GAUCHE" +PythonKeyRightParenthesis = "Touche PARENTHESE DROITE" +PythonKeyFour = "Touche 4" +PythonKeyFive = "Touche 5" +PythonKeySix = "Touche 6" +PythonKeyMultiplication = "Touche MULTIPLICATION" +PythonKeyDivision = "Touche DIVISION" +PythonKeyOne = "Touche 1" +PythonKeyTwo = "Touche 2" +PythonKeyThree = "Touche 3" +PythonKeyPlus = "Touche PLUS" +PythonKeyMinus = "Touche MOINS" +PythonKeyZero = "Touche 0" +PythonKeyDot = "Touche POINT" +PythonKeyEe = "Touche 10 PUISSANCE X" +PythonKeyAns = "Touche ANS" +PythonKeyExe = "Touche EXE" PythonLdexp = "Inverse de frexp : x*(2**i)" PythonLength = "Longueur d'un objet" PythonLgamma = "Logarithme de la fonction gamma" diff --git a/apps/code/catalog.hu.i18n b/apps/code/catalog.hu.i18n index ad7eb410f..3dac49470 100644 --- a/apps/code/catalog.hu.i18n +++ b/apps/code/catalog.hu.i18n @@ -208,3 +208,49 @@ PythonSysImplementation = "Information about Python" PythonSysModules = "Dictionary of loaded modules" PythonSysVersion = "Python language version (string)" PythonSysVersioninfo = "Python language version (tuple)" +PythonKeyLeft = "BALRA NYÍL billentyű" +PythonKeyUp = "FEL NYÍL billentyű" +PythonKeyDown = "LE NYÍL billentyű" +PythonKeyRight = "JOBBRA NYÍL billentyű" +PythonKeyOk = "OK gomb" +PythonKeyBack = "VISSZA gomb" +PythonKeyHome = "Lakáskulcs" +PythonKeyOnOff = "BE/KI gomb" +PythonKeyShift = "SHIFT billentyű" +PythonKeyAlpha = "ALPHA kulcs" +PythonKeyXnt = "X,N,T gomb" +PythonKeyVar = "VAR gomb" +PythonKeyToolbox = "TOOLBOX gomb" +PythonKeyBackspace = "BACKSPACE billentyű" +PythonKeyExp = "EXPONENTIÁLIS kulcs" +PythonKeyLn = "TERMÉSZETES LOGARITMUS kulcs" +PythonKeyLog = "DECIMÁLIS LOGARITMUS billentyű" +PythonKeyImaginary = "KÉPZELETES I kulcs" +PythonKeyComma = "VESZSŰ gomb" +PythonKeyPower = "POWER gomb" +PythonKeySine = "SINE gomb" +PythonKeyCosine = "KOSINUS kulcs" +PythonKeyTangent = "ÉRINTŐ gomb" +PythonKeyPi = "PI kulcs" +PythonKeySqrt = "NÉGYGYÖK kulcs" +PythonKeySquare = "SZÖGZET billentyű" +PythonKeySeven = "7 kulcs" +PythonKeyEight = "8 kulcs" +PythonKeyNine = "9 kulcs" +PythonKeyLeftParenthesis = "BAL ZÁRÓZELŐ gomb" +PythonKeyRightParenthesis = "JOBB ZÁRÓZELŐ billentyű" +PythonKeyFour = "4 kulcs" +PythonKeyFive = "5 kulcs" +PythonKeySix = "6 kulcs" +PythonKeyMultiplication = "SZORZAT gomb" +PythonKeyDivision = "OSZTÁS kulcs" +PythonKeyOne = "1 kulcs" +PythonKeyTwo = "2 kulcs" +PythonKeyThree = "3 kulcs" +PythonKeyPlus = "PLUSZ kulcs" +PythonKeyMinus = "MÍNUS gomb" +PythonKeyZero = "0 kulcs" +PythonKeyDot = "DOT gomb" +PythonKeyEe = "10 POWER X gomb" +PythonKeyAns = "ANS kulcs" +PythonKeyExe = "EXE kulcs" diff --git a/apps/code/catalog.it.i18n b/apps/code/catalog.it.i18n index 9a1bae232..7e797a399 100644 --- a/apps/code/catalog.it.i18n +++ b/apps/code/catalog.it.i18n @@ -109,6 +109,52 @@ PythonSetBrightness = "Imposta livello di luminosità" PythonGetBrightness = "Ottieni livello di luminosità" PythonIsNaN = "Testa se x è NaN" PythonKandinskyFunction = "Prefisso funzione modulo kandinsky" +PythonKeyLeft = "Tasto FRECCIA SINISTRA" +PythonKeyUp = "Tasto FRECCIA ALTO" +PythonKeyDown = "Tasto FRECCIA BASSO" +PythonKeyRight = "Tasto FRECCIA DESTRA" +PythonKeyOk = "Tasto OK" +PythonKeyBack = "Tasto INDIETRO" +PythonKeyHome = "Tasto CASA" +PythonKeyOnOff = "Tasto ON/OFF" +PythonKeyShift = "Tasto SHIFT" +PythonKeyAlpha = "Tasto ALPHA" +PythonKeyXnt = "Tasto X,N,T" +PythonKeyVar = "Tasto VAR" +PythonKeyToolbox = "Tasto TOOLBOX" +PythonKeyBackspace = "Tasto CANCELLA" +PythonKeyExp = "Tasto ESPONENZIALE" +PythonKeyLn = "Tasto LOGARITMO NEPERIANO" +PythonKeyLog = "Tasto LOGARITMO DECIMALE" +PythonKeyImaginary = "Tasto I IMMAGINE" +PythonKeyComma = "Tasto VIRGOLA" +PythonKeyPower = "Tasto POTENZA" +PythonKeySine = "Tasto SENO" +PythonKeyCosine = "Tasto COSENO" +PythonKeyTangent = "Tasto TANGENTE" +PythonKeyPi = "Tasto PI" +PythonKeySqrt = "Tasto RADICE QUADRATA" +PythonKeySquare = "Tasto QUADRATO" +PythonKeySeven = "Tasto 7" +PythonKeyEight = "Tasto 8" +PythonKeyNine = "Tasto 9" +PythonKeyLeftParenthesis = "Tasto PARENTESI SINISTRA" +PythonKeyRightParenthesis = "Tasto PARENTESI DESTRA" +PythonKeyFour = "Tasto 4" +PythonKeyFive = "Tasto 5" +PythonKeySix = "Tasto 6" +PythonKeyMultiplication = "Tasto MOLTIPLICAZIONE" +PythonKeyDivision = "Tasto DIVISIONE" +PythonKeyOne = "Tasto 1" +PythonKeyTwo = "Tasto 2" +PythonKeyThree = "Tasto 3" +PythonKeyPlus = "Tasto PIÙ" +PythonKeyMinus = "Tasto MENO" +PythonKeyZero = "Tasto 0" +PythonKeyDot = "Tasto PUNTO" +PythonKeyEe = "Tasto 10 POTENZA X" +PythonKeyAns = "Tasto ANS" +PythonKeyExe = "Tasto EXE" PythonLdexp = "Inversa di frexp : x*(2**i)" PythonLength = "Longhezza di un oggetto" PythonLgamma = "Logaritmo della funzione gamma" diff --git a/apps/code/catalog.nl.i18n b/apps/code/catalog.nl.i18n index 8fe6b81e0..9d98d756e 100644 --- a/apps/code/catalog.nl.i18n +++ b/apps/code/catalog.nl.i18n @@ -110,6 +110,52 @@ PythonSetBrightness = "Set brightness level" PythonGetBrightness = "Get brightness level" PythonIsNaN = "Controleer of x geen getal is" PythonKandinskyFunction = "kandinsky module voorvoegsel" +PythonKeyLeft = "PIJL NAAR LINKS toets" +PythonKeyUp = "PIJL OMHOOG toets" +PythonKeyDown = "PIJL OMLAAG toets" +PythonKeyRight = "PIJL NAAR RECHTS toets" +PythonKeyOk = "OK toets" +PythonKeyBack = "TERUG toets" +PythonKeyHome = "HOME toets" +PythonKeyOnOff = "AAN/UIT toets" +PythonKeyShift = "SHIFT toets" +PythonKeyAlpha = "ALPHA toets" +PythonKeyXnt = "X,N,T toets" +PythonKeyVar = "VAR toets" +PythonKeyToolbox = "TOOLBOX toets" +PythonKeyBackspace = "BACKSPACE toets" +PythonKeyExp = "EXPONENTIEEL toets" +PythonKeyLn = "NATUURLIJKE LOGARITME toets" +PythonKeyLog = "BRIGGSE LOGARITME toets" +PythonKeyImaginary = "IMAGINAIRE I toets" +PythonKeyComma = "KOMMA toets" +PythonKeyPower = "MACHT toets" +PythonKeySine = "SINUS toets" +PythonKeyCosine = "COSINUS toets" +PythonKeyTangent = "TANGENS toets" +PythonKeyPi = "PI toets" +PythonKeySqrt = "VIERKANTSWORTEL toets" +PythonKeySquare = "KWADRAAT toets" +PythonKeySeven = "7 toets" +PythonKeyEight = "8 toets" +PythonKeyNine = "9 toets" +PythonKeyLeftParenthesis = "HAAKJE OPENEN toets" +PythonKeyRightParenthesis = "HAAKJE SLUITEN toets" +PythonKeyFour = "4 toets" +PythonKeyFive = "5 toets" +PythonKeySix = "6 toets" +PythonKeyMultiplication = "VERMENIGVULDIGEN toets" +PythonKeyDivision = "DELEN toets" +PythonKeyOne = "1 toets" +PythonKeyTwo = "2 toets" +PythonKeyThree = "3 toets" +PythonKeyPlus = "PLUS toets" +PythonKeyMinus = "MIN toets" +PythonKeyZero = "0 toets" +PythonKeyDot = "PUNT toets" +PythonKeyEe = "10 TOT DE MACHT X toets" +PythonKeyAns = "ANS toets" +PythonKeyExe = "EXE toets" PythonLdexp = "Geeft x*(2**i), inversie van frexp" PythonLength = "Lengte van een object" PythonLgamma = "Log-gammafunctie" diff --git a/apps/code/catalog.pt.i18n b/apps/code/catalog.pt.i18n index 1a894c322..d3a49aa55 100644 --- a/apps/code/catalog.pt.i18n +++ b/apps/code/catalog.pt.i18n @@ -95,6 +95,52 @@ PythonSetBrightness = "Definir nível de brilho" PythonGetBrightness = "Obter nível de brilho" PythonIsNaN = "Verificar se x é um NaN" PythonKandinskyFunction = "Prefixo da função do módulo kandinsky" +PythonKeyLeft = "tecla SETA ESQUERDA" +PythonKeyUp = "tecla SETA CIMA " +PythonKeyDown = "tecla SETA BAIXO" +PythonKeyRight = "tecla SETA DIREITA" +PythonKeyOk = "tecla OK" +PythonKeyBack = "tecla VOLTAR" +PythonKeyHome = "tecla HOME" +PythonKeyOnOff = "tecla ON/OFF" +PythonKeyShift = "tecla SHIFT" +PythonKeyAlpha = "tecla ALPHA" +PythonKeyXnt = "tecla X,N,T" +PythonKeyVar = "tecla VAR" +PythonKeyToolbox = "tecla CAIXA DE FERRAMENTAS" +PythonKeyBackspace = "tecla APAGAR" +PythonKeyExp = "tecla EXPONENCIAL" +PythonKeyLn = "tecla LOGARITMO NATURAL" +PythonKeyLog = "tecla LOGARITMO DECIMAL" +PythonKeyImaginary = "tecla I IMAGINÁRIO" +PythonKeyComma = "tecla VÍRGULA" +PythonKeyPower = "tecla EXPOENTE" +PythonKeySine = "tecla SENO" +PythonKeyCosine = "tecla COSSENO" +PythonKeyTangent = "tecla TANGENTE" +PythonKeyPi = "tecla PI" +PythonKeySqrt = "tecla RAIZ QUADRADA" +PythonKeySquare = "tecla AO QUADRADO" +PythonKeySeven = "tecla 7" +PythonKeyEight = "tecla 8" +PythonKeyNine = "tecla 9" +PythonKeyLeftParenthesis = "tecla PARÊNTESE ESQUERDO" +PythonKeyRightParenthesis = "tecla PARÊNTESE DIREITO" +PythonKeyFour = "tecla 4" +PythonKeyFive = "tecla 5" +PythonKeySix = "tecla 6" +PythonKeyMultiplication = "tecla MULTIPLICAÇÃO" +PythonKeyDivision = "tecla DIVISÃO" +PythonKeyOne = "tecla 1" +PythonKeyTwo = "tecla 2" +PythonKeyThree = "tecla 3" +PythonKeyPlus = "tecla MAIS" +PythonKeyMinus = "tecla MENOS" +PythonKeyZero = "tecla 0" +PythonKeyDot = "tecla PONTO" +PythonKeyEe = "tecla 10 expoente X" +PythonKeyAns = "tecla ANS" +PythonKeyExe = "tecla EXE" PythonLdexp = "Devolve x*(2**i), inverso de frexp" PythonLength = "Comprimento de um objeto" PythonLgamma = "Logaritmo da função gama" diff --git a/apps/code/catalog.universal.i18n b/apps/code/catalog.universal.i18n index 7da352806..05a79de12 100644 --- a/apps/code/catalog.universal.i18n +++ b/apps/code/catalog.universal.i18n @@ -114,6 +114,52 @@ PythonCommandIsInfinite = "isinf(x)" PythonCommandIsNaN = "isnan(x)" PythonCommandKandinskyFunction = "kandinsky.function" PythonCommandKandinskyFunctionWithoutArg = "kandinsky.\x11" +PythonCommandKeyLeft = "KEY_LEFT" +PythonCommandKeyUp = "KEY_UP" +PythonCommandKeyDown = "KEY_DOWN" +PythonCommandKeyRight = "KEY_RIGHT" +PythonCommandKeyOk = "KEY_OK" +PythonCommandKeyBack = "KEY_BACK" +PythonCommandKeyHome = "KEY_HOME" +PythonCommandKeyOnOff = "KEY_ONOFF" +PythonCommandKeyShift = "KEY_SHIFT" +PythonCommandKeyAlpha = "KEY_ALPHA" +PythonCommandKeyXnt = "KEY_XNT" +PythonCommandKeyVar = "KEY_VAR" +PythonCommandKeyToolbox = "KEY_TOOLBOX" +PythonCommandKeyBackspace = "KEY_BACKSPACE" +PythonCommandKeyExp = "KEY_EXP" +PythonCommandKeyLn = "KEY_LN" +PythonCommandKeyLog = "KEY_LOG" +PythonCommandKeyImaginary = "KEY_IMAGINARY" +PythonCommandKeyComma = "KEY_COMMA" +PythonCommandKeyPower = "KEY_POWER" +PythonCommandKeySine = "KEY_SINE" +PythonCommandKeyCosine = "KEY_COSINE" +PythonCommandKeyTangent = "KEY_TANGENT" +PythonCommandKeyPi = "KEY_PI" +PythonCommandKeySqrt = "KEY_SQRT" +PythonCommandKeySquare = "KEY_SQUARE" +PythonCommandKeySeven = "KEY_SEVEN" +PythonCommandKeyEight = "KEY_EIGHT" +PythonCommandKeyNine = "KEY_NINE" +PythonCommandKeyLeftParenthesis = "KEY_LEFTPARENTHESIS" +PythonCommandKeyRightParenthesis = "KEY_RIGHTPARENTHESIS" +PythonCommandKeyFour = "KEY_FOUR" +PythonCommandKeyFive = "KEY_FIVE" +PythonCommandKeySix = "KEY_SIX" +PythonCommandKeyMultiplication = "KEY_MULTIPLICATION" +PythonCommandKeyDivision = "KEY_DIVISION" +PythonCommandKeyOne = "KEY_ONE" +PythonCommandKeyTwo = "KEY_TWO" +PythonCommandKeyThree = "KEY_THREE" +PythonCommandKeyPlus = "KEY_PLUS" +PythonCommandKeyMinus = "KEY_MINUS" +PythonCommandKeyZero = "KEY_ZERO" +PythonCommandKeyDot = "KEY_DOT" +PythonCommandKeyEe = "KEY_EE" +PythonCommandKeyAns = "KEY_ANS" +PythonCommandKeyExe = "KEY_EXE" PythonCommandIsKeyDown = "keydown(k)" PythonCommandBattery = "battery()" PythonCommandBatteryLevel = "battery_level()" diff --git a/apps/code/python_toolbox.cpp b/apps/code/python_toolbox.cpp index 35a453b22..d601db5f1 100644 --- a/apps/code/python_toolbox.cpp +++ b/apps/code/python_toolbox.cpp @@ -366,7 +366,57 @@ const ToolboxMessageTree KandinskyModuleChildren[] = { ToolboxMessageTree::Leaf(I18n::Message::PythonCommandFillRect, I18n::Message::PythonFillRect), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandFillCircle, I18n::Message::PythonFillCircle), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandFillPolygon, I18n::Message::PythonFillPolygon), - ToolboxMessageTree::Leaf(I18n::Message::PythonCommandGetPalette, I18n::Message::PythonGetPalette)}; + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandGetPalette, I18n::Message::PythonGetPalette) +}; + +const ToolboxMessageTree IonKeyModuleChildren[] = { + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyLeft, I18n::Message::PythonKeyLeft, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyUp, I18n::Message::PythonKeyUp, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyDown, I18n::Message::PythonKeyDown, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyRight, I18n::Message::PythonKeyRight, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyOk, I18n::Message::PythonKeyOk, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyBack, I18n::Message::PythonKeyBack, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyHome, I18n::Message::PythonKeyHome, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyOnOff, I18n::Message::PythonKeyOnOff, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyShift, I18n::Message::PythonKeyShift, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyAlpha, I18n::Message::PythonKeyAlpha, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyXnt, I18n::Message::PythonKeyXnt, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyVar, I18n::Message::PythonKeyVar, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyToolbox, I18n::Message::PythonKeyToolbox, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyBackspace, I18n::Message::PythonKeyBackspace, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyExp, I18n::Message::PythonKeyExp, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyLn, I18n::Message::PythonKeyLn, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyLog, I18n::Message::PythonKeyLog, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyImaginary, I18n::Message::PythonKeyImaginary, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyComma, I18n::Message::PythonKeyComma, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyPower, I18n::Message::PythonKeyPower, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeySine, I18n::Message::PythonKeySine, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyCosine, I18n::Message::PythonKeyCosine, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyTangent, I18n::Message::PythonKeyTangent, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyPi, I18n::Message::PythonKeyPi, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeySqrt, I18n::Message::PythonKeySqrt, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeySquare, I18n::Message::PythonKeySquare, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeySeven, I18n::Message::PythonKeySeven, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyEight, I18n::Message::PythonKeyEight, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyNine, I18n::Message::PythonKeyNine, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyLeftParenthesis, I18n::Message::PythonKeyLeftParenthesis, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyRightParenthesis, I18n::Message::PythonKeyRightParenthesis, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyFour, I18n::Message::PythonKeyFour, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyFive, I18n::Message::PythonKeyFive, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeySix, I18n::Message::PythonKeySix, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyMultiplication, I18n::Message::PythonKeyMultiplication, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyDivision, I18n::Message::PythonKeyDivision, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyOne, I18n::Message::PythonKeyOne, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyTwo, I18n::Message::PythonKeyTwo, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyThree, I18n::Message::PythonKeyThree, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyPlus, I18n::Message::PythonKeyPlus, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyMinus, I18n::Message::PythonKeyMinus, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyZero, I18n::Message::PythonKeyZero, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyDot, I18n::Message::PythonKeyDot, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyEe, I18n::Message::PythonKeyEe, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyAns, I18n::Message::PythonKeyAns, false), + ToolboxMessageTree::Leaf(I18n::Message::PythonCommandKeyExe, I18n::Message::PythonKeyExe, false) +}; const ToolboxMessageTree IonModuleChildren[] = { ToolboxMessageTree::Leaf(I18n::Message::PythonCommandImportIon, I18n::Message::PythonImportIon, false), @@ -379,7 +429,9 @@ const ToolboxMessageTree IonModuleChildren[] = { ToolboxMessageTree::Leaf(I18n::Message::PythonCommandBatteryIscharging, I18n::Message::PythonBatteryIscharging), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandSetBrightness, I18n::Message::PythonSetBrightness), ToolboxMessageTree::Leaf(I18n::Message::PythonCommandGetBrightness, I18n::Message::PythonGetBrightness), - ToolboxMessageTree::Leaf(I18n::Message::IonSelector, I18n::Message::IonSelector) + // This is a special case, because it is handled separately, so the sub-tree is unused. + ToolboxMessageTree::Node(I18n::Message::IonSelector, IonKeyModuleChildren), + ToolboxMessageTree::Node(I18n::Message::IonKeyList, IonKeyModuleChildren) }; const ToolboxMessageTree TimeModuleChildren[] = { @@ -706,11 +758,6 @@ bool PythonToolbox::selectLeaf(int selectedRow, bool quitToolbox) { return true; } #endif - if(node->insertedText() == I18n::Message::IonSelector){ - m_ionKeys.setSender(sender()); - Container::activeApp()->displayModalViewController(static_cast(&m_ionKeys), 0.f, 0.f, Metric::PopUpTopMargin, Metric::PopUpLeftMargin, 0, Metric::PopUpRightMargin); - return true; - } const char * editedText = I18n::translate(node->insertedText()); // strippedEditedText array needs to be in the same scope as editedText char strippedEditedText[k_maxMessageSize]; @@ -728,6 +775,24 @@ bool PythonToolbox::selectLeaf(int selectedRow, bool quitToolbox) { return true; } +// This is the same function as in the Toolbox class, but we need to override it because we need to handle the Key selector differently. +bool PythonToolbox::selectSubMenu(int selectedRow) { + // If the selected row is a is the Key selector, we display the IonKeySelectorViewController + if (m_messageTreeModel->childAtIndex(selectedRow)->label() == I18n::Message::IonSelector) { + m_ionKeys.setSender(sender()); + Container::activeApp()->displayModalViewController(static_cast(&m_ionKeys), 0.f, 0.f, Metric::PopUpTopMargin, Metric::PopUpLeftMargin, 0, Metric::PopUpRightMargin); + return true; + } + m_selectableTableView.deselectTable(); + m_messageTreeModel = static_cast(m_messageTreeModel->childAtIndex(selectedRow)); + if (m_messageTreeModel->isFork()) { + assert(m_messageTreeModel->numberOfChildren() < 0); + m_messageTreeModel = static_cast(m_messageTreeModel->childAtIndex(indexAfterFork())); + } + return NestedMenuController::selectSubMenu(selectedRow); +} + + const ToolboxMessageTree * PythonToolbox::rootModel() const { return &toolboxModel; } diff --git a/apps/code/python_toolbox.h b/apps/code/python_toolbox.h index 9be9f4aa9..4252b1f16 100644 --- a/apps/code/python_toolbox.h +++ b/apps/code/python_toolbox.h @@ -21,6 +21,7 @@ public: protected: KDCoordinate rowHeight(int j) override; bool selectLeaf(int selectedRow, bool quitToolbox) override; + bool selectSubMenu(int selectedRow) override; MessageTableCellWithMessage * leafCellAtIndex(int index) override; MessageTableCellWithChevron* nodeCellAtIndex(int index) override; int maxNumberOfDisplayedRows() override; @@ -34,7 +35,7 @@ private: void scrollToAndSelectChild(int i); MessageTableCellWithMessage m_leafCells[k_maxNumberOfDisplayedRows]; MessageTableCellWithChevron m_nodeCells[k_maxNumberOfDisplayedRows]; - toolboxIonKeys m_ionKeys; + ToolboxIonKeys m_ionKeys; }; } diff --git a/apps/code/test/toolbox_ion_keys_dummy.cpp b/apps/code/test/toolbox_ion_keys_dummy.cpp index 9f38bb541..969b20e3c 100644 --- a/apps/code/test/toolbox_ion_keys_dummy.cpp +++ b/apps/code/test/toolbox_ion_keys_dummy.cpp @@ -1,26 +1,26 @@ #include "../toolbox_ion_keys.h" namespace Code { - toolboxIonKeys::toolboxIonKeys() : + ToolboxIonKeys::ToolboxIonKeys() : ViewController(nullptr), m_view() { } - bool toolboxIonKeys::handleEvent(Ion::Events::Event e) { + bool ToolboxIonKeys::handleEvent(Ion::Events::Event e) { return false; } - toolboxIonKeys::toolboxIonView::toolboxIonView(): + ToolboxIonKeys::toolboxIonView::toolboxIonView(): View() { } - void toolboxIonKeys::toolboxIonView::drawRect(KDContext * ctx, KDRect rect) const { + void ToolboxIonKeys::toolboxIonView::drawRect(KDContext * ctx, KDRect rect) const { return; } - View * toolboxIonKeys::view(){ + View * ToolboxIonKeys::view(){ return &m_view; } diff --git a/apps/code/toolbox.de.i18n b/apps/code/toolbox.de.i18n index 82dd2b142..c71afcc52 100644 --- a/apps/code/toolbox.de.i18n +++ b/apps/code/toolbox.de.i18n @@ -5,3 +5,6 @@ LoopsAndTests = "Schleifen und Tests" Files = "Dateien" Exceptions = "Ausnahmen" UlabDocumentation = "Dokumentation" +IonSelector = "Schlüsselauswahl" +PressAKey = "drücke eine Taste" +IonKeyList = "Liste der Schlüssel" diff --git a/apps/code/toolbox.en.i18n b/apps/code/toolbox.en.i18n index 59eadf403..820680d2f 100644 --- a/apps/code/toolbox.en.i18n +++ b/apps/code/toolbox.en.i18n @@ -5,3 +5,6 @@ LoopsAndTests = "Loops and tests" Files = "Files" Exceptions = "Exceptions" UlabDocumentation = "Documentation" +IonSelector = "Key selector" +PressAKey = "Press a key" +IonKeyList = "List of keys" diff --git a/apps/code/toolbox.es.i18n b/apps/code/toolbox.es.i18n index 905e28a8e..8744a2872 100644 --- a/apps/code/toolbox.es.i18n +++ b/apps/code/toolbox.es.i18n @@ -5,3 +5,6 @@ LoopsAndTests = "Loops and tests" Files = "Files" Exceptions = "Exceptions" UlabDocumentation = "Documentación" +IonSelector = "Selector de llave" +PressAKey = "presione una tecla" +IonKeyList = "Lista de llaves" diff --git a/apps/code/toolbox.fr.i18n b/apps/code/toolbox.fr.i18n index 077e4550a..b2c2dfe97 100644 --- a/apps/code/toolbox.fr.i18n +++ b/apps/code/toolbox.fr.i18n @@ -5,3 +5,6 @@ LoopsAndTests = "Boucles et tests" Files = "Fichiers" Exceptions = "Exceptions" UlabDocumentation = "Documentation" +IonSelector = "Sélecteur de touche" +PressAKey = "Appuyez sur une touche" +IonKeyList = "Liste des touches" diff --git a/apps/code/toolbox.hu.i18n b/apps/code/toolbox.hu.i18n index fbdff6f74..da82c67b2 100644 --- a/apps/code/toolbox.hu.i18n +++ b/apps/code/toolbox.hu.i18n @@ -5,3 +5,6 @@ LoopsAndTests = "Hurkok és tesztek" Files = "Fájlok" Exceptions = "Kivételek" UlabDocumentation = "Dokumentáció" +IonSelector = "Kulcsválasztó" +PressAKey = "Nyomj meg egy gombot" +IonKeyList = "A kulcsok listája" diff --git a/apps/code/toolbox.it.i18n b/apps/code/toolbox.it.i18n index 7069ccb4e..7ec36994c 100644 --- a/apps/code/toolbox.it.i18n +++ b/apps/code/toolbox.it.i18n @@ -5,3 +5,6 @@ LoopsAndTests = "Cicli e test" Files = "Files" Exceptions = "Exceptions" UlabDocumentation = "Documentazione" +IonSelector = "Selettore a chiave" +PressAKey = "Premi un tasto" +IonKeyList = "Elenco delle chiavi" diff --git a/apps/code/toolbox.nl.i18n b/apps/code/toolbox.nl.i18n index 4df9ed1a7..137144df5 100644 --- a/apps/code/toolbox.nl.i18n +++ b/apps/code/toolbox.nl.i18n @@ -5,3 +5,6 @@ LoopsAndTests = "Herhalingen en testen" Files = "Files" Exceptions = "Exceptions" UlabDocumentation = "Documentatie" +IonSelector = "Toetsenkiezer" +PressAKey = "druk op een knop" +IonKeyList = "Lijst met sleutels" diff --git a/apps/code/toolbox.pt.i18n b/apps/code/toolbox.pt.i18n index 4ea2d75fd..9884dfdc0 100644 --- a/apps/code/toolbox.pt.i18n +++ b/apps/code/toolbox.pt.i18n @@ -5,3 +5,6 @@ LoopsAndTests = "Laços e testes" Files = "Files" Exceptions = "Exceptions" UlabDocumentation = "Documentação" +IonSelector = "Seletor de chave" +PressAKey = "Pressione uma tecla" +IonKeyList = "Lista de chaves" diff --git a/apps/code/toolbox.universal.i18n b/apps/code/toolbox.universal.i18n index e7664f96c..1e757f43a 100644 --- a/apps/code/toolbox.universal.i18n +++ b/apps/code/toolbox.universal.i18n @@ -68,6 +68,4 @@ PythonCommandDef = "def \x11():\n " PythonCommandDefWithArg = "def function(x):" PythonCommandReturn = "return " RandomModule = "random" -IonSelector = "Key selector" -PressAKey = "Press a key" UlabDocumentationLink = "micropython-ulab.readthedocs.io" diff --git a/apps/code/toolbox_ion_keys.cpp b/apps/code/toolbox_ion_keys.cpp index fe0a40d5b..b5167d60c 100644 --- a/apps/code/toolbox_ion_keys.cpp +++ b/apps/code/toolbox_ion_keys.cpp @@ -9,42 +9,49 @@ extern "C" { extern "C" const mp_rom_map_elem_t modion_module_globals_table[52]; namespace Code { - toolboxIonKeys::toolboxIonKeys() : +ToolboxIonKeys::ToolboxIonKeys() : ViewController(nullptr), m_view() - { - } +{ +} - bool toolboxIonKeys::handleEvent(Ion::Events::Event e) { - Ion::Keyboard::State state = Ion::Keyboard::scan(); - for(uint16_t i = 0; i < sizeof(modion_module_globals_table)/sizeof(_mp_rom_map_elem_t); i++){ - _mp_rom_map_elem_t element = modion_module_globals_table[i]; - if(mp_obj_is_small_int(element.value)){ - int key = mp_obj_get_int(element.value); - if(state.keyDown(static_cast(key))){ - m_sender->handleEventWithText(qstr_str(MP_OBJ_QSTR_VALUE(element.key)), true); - } +bool ToolboxIonKeys::handleEvent(Ion::Events::Event e) { + // FIXME: Use event data to get the pressed key and fix the EXE key. + Ion::Keyboard::State state = Ion::Keyboard::scan(); + for (uint16_t i = 0; i < sizeof(modion_module_globals_table) / sizeof(_mp_rom_map_elem_t); i++) { + _mp_rom_map_elem_t element = modion_module_globals_table[i]; + if (mp_obj_is_small_int(element.value)) { + int key = mp_obj_get_int(element.value); + if (state.keyDown(static_cast(key))) { + m_sender->handleEventWithText(qstr_str(MP_OBJ_QSTR_VALUE(element.key)), true); } } - Container::activeApp()->dismissModalViewController(); - AppsContainer::sharedAppsContainer()->redrawWindow(); - return true; } + Container::activeApp()->dismissModalViewController(); + AppsContainer::sharedAppsContainer()->redrawWindow(); + return true; +} - toolboxIonKeys::toolboxIonView::toolboxIonView(): - View() - { - } +ToolboxIonKeys::toolboxIonView::toolboxIonView() : + View() +{ +} - void toolboxIonKeys::toolboxIonView::drawRect(KDContext * ctx, KDRect rect) const { - ctx->fillRect(rect, Palette::WallScreen); - ctx->strokeRect(rect, Palette::ListCellBorder); - ctx->drawString(I18n::translate(I18n::Message::PressAKey),KDPoint(rect.left()+80, rect.top()+20),KDFont::LargeFont,Palette::PrimaryText,Palette::WallScreen); - - } +void ToolboxIonKeys::toolboxIonView::drawRect(KDContext * ctx, KDRect rect) const { + ctx->fillRect(rect, Palette::WallScreen); + ctx->strokeRect(rect, Palette::ListCellBorder); + KDSize fontSize = KDFont::LargeFont->glyphSize(); + const char * message = I18n::translate(I18n::Message::PressAKey); + // Get the starting position of the text to center it. + KDPoint textPosition = KDPoint(rect.size().width() / 2 - strlen(message) * fontSize.width() / 2, + rect.size().height() / 2 - fontSize.height() / 2); - View * toolboxIonKeys::view(){ - return &m_view; - } + ctx->drawString(message, textPosition, KDFont::LargeFont, Palette::PrimaryText, Palette::WallScreen); + +} + +View * ToolboxIonKeys::view() { + return &m_view; +} } diff --git a/apps/code/toolbox_ion_keys.h b/apps/code/toolbox_ion_keys.h index 4efe2036d..d6706ea34 100644 --- a/apps/code/toolbox_ion_keys.h +++ b/apps/code/toolbox_ion_keys.h @@ -2,9 +2,9 @@ namespace Code { - class toolboxIonKeys : public ViewController { + class ToolboxIonKeys : public ViewController { public : - toolboxIonKeys(); + ToolboxIonKeys(); View * view() override; bool handleEvent(Ion::Events::Event e) override; void setSender(InputEventHandler * sender) { m_sender = sender; }