diff --git a/authorizer/src/main/java/net/tjado/authorizer/OutputInterface.java b/authorizer/src/main/java/net/tjado/authorizer/OutputInterface.java index e11b201f..66424bb6 100644 --- a/authorizer/src/main/java/net/tjado/authorizer/OutputInterface.java +++ b/authorizer/src/main/java/net/tjado/authorizer/OutputInterface.java @@ -10,7 +10,7 @@ package net.tjado.authorizer; public interface OutputInterface { - public enum Language { en_US, en_GB, de_DE, AppleMac_de_DE, de_CH, fr_CH, fr_FR, neo } + public enum Language { en_US, en_GB, de_DE, AppleMac_de_DE, de_CH, es_ES, fr_CH, fr_FR, neo } public boolean setLanguage(OutputInterface.Language lang); public int sendText(String text) throws Exception; public int sendReturn() throws Exception; diff --git a/authorizer/src/main/java/net/tjado/authorizer/UsbHidKbd_es_ES.java b/authorizer/src/main/java/net/tjado/authorizer/UsbHidKbd_es_ES.java new file mode 100644 index 00000000..da20828d --- /dev/null +++ b/authorizer/src/main/java/net/tjado/authorizer/UsbHidKbd_es_ES.java @@ -0,0 +1,156 @@ +/** + * Authorizer + * + * Copyright 2016 by Tjado Mäcke + * Licensed under GNU General Public License 3.0. + * + * @license GPL-3.0 + */ + +package net.tjado.authorizer; + + +public class UsbHidKbd_es_ES extends UsbHidKbd { + + public UsbHidKbd_es_ES() { + + kbdVal.put(null, new byte[] {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("a", new byte[] {0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("b", new byte[] {0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("c", new byte[] {0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("d", new byte[] {0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("e", new byte[] {0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("f", new byte[] {0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("g", new byte[] {0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("h", new byte[] {0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("i", new byte[] {0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("j", new byte[] {0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("k", new byte[] {0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("l", new byte[] {0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("m", new byte[] {0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("n", new byte[] {0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("o", new byte[] {0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("p", new byte[] {0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("q", new byte[] {0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("r", new byte[] {0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("s", new byte[] {0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("t", new byte[] {0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("u", new byte[] {0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("v", new byte[] {0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("w", new byte[] {0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("x", new byte[] {0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("y", new byte[] {0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("z", new byte[] {0x00, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00} ); + + kbdVal.put("A", new byte[] {0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("B", new byte[] {0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("C", new byte[] {0x02, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("D", new byte[] {0x02, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("E", new byte[] {0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("F", new byte[] {0x02, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("G", new byte[] {0x02, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("H", new byte[] {0x02, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("I", new byte[] {0x02, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("J", new byte[] {0x02, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("K", new byte[] {0x02, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("L", new byte[] {0x02, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("M", new byte[] {0x02, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("N", new byte[] {0x02, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("O", new byte[] {0x02, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("P", new byte[] {0x02, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("Q", new byte[] {0x02, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("R", new byte[] {0x02, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("S", new byte[] {0x02, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("T", new byte[] {0x02, 0x00, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("U", new byte[] {0x02, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("V", new byte[] {0x02, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("W", new byte[] {0x02, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("X", new byte[] {0x02, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("Y", new byte[] {0x02, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("Z", new byte[] {0x02, 0x00, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00} ); + + kbdVal.put("1", new byte[] {0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("2", new byte[] {0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("3", new byte[] {0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("4", new byte[] {0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("5", new byte[] {0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("6", new byte[] {0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("7", new byte[] {0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("8", new byte[] {0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("9", new byte[] {0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("0", new byte[] {0x00, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00} ); + + kbdVal.put("!", new byte[] {0x02, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("\"", new byte[] {0x02, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("·", new byte[] {0x02, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("$", new byte[] {0x02, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("%", new byte[] {0x02, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("&", new byte[] {0x02, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("/", new byte[] {0x02, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("(", new byte[] {0x02, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put(")", new byte[] {0x02, 0x00, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("=", new byte[] {0x02, 0x00, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00} ); + + kbdVal.put("|", new byte[] {0x40, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("@", new byte[] {0x40, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("#", new byte[] {0x40, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("~", new byte[] {0x40, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("½", new byte[] {0x40, 0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("¬", new byte[] {0x40, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00} ); + + kbdVal.put("return", new byte[] {0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("enter", new byte[] {0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("tab", new byte[] {0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("tabulator", new byte[] {0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("esc", new byte[] {0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("escape", new byte[] {0x00, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("bckspc", new byte[] {0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("backspace", new byte[] {0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00} ); + + kbdVal.put("\t", new byte[] {0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put(" ", new byte[] {0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00} ); + + kbdVal.put("'", new byte[] {0x00, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("¡", new byte[] {0x00, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("`", new byte[] {0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("+", new byte[] {0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("ç", new byte[] {0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("ñ", new byte[] {0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("´", new byte[] {0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("º", new byte[] {0x00, 0x00, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put(",", new byte[] {0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put(".", new byte[] {0x00, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("-", new byte[] {0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("<", new byte[] {0x00, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00} ); + + kbdVal.put("?", new byte[] {0x02, 0x00, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("¿", new byte[] {0x02, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("^", new byte[] {0x02, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("*", new byte[] {0x02, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("Ç", new byte[] {0x02, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("Ñ", new byte[] {0x02, 0x00, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("¨", new byte[] {0x02, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("ª", new byte[] {0x02, 0x00, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put(";", new byte[] {0x02, 0x00, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put(":", new byte[] {0x02, 0x00, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("_", new byte[] {0x02, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put(">", new byte[] {0x02, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00} ); + + kbdVal.put("[", new byte[] {0x40, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("¸", new byte[] {0x40, 0x00, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("]", new byte[] {0x40, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("}", new byte[] {0x40, 0x00, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("{", new byte[] {0x40, 0x00, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00} ); + kbdVal.put("\\", new byte[] {0x40, 0x00, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00} ); + + } + +} diff --git a/authorizer/src/main/res/values/strings.xml b/authorizer/src/main/res/values/strings.xml index c5f733d2..be95ba5d 100644 --- a/authorizer/src/main/res/values/strings.xml +++ b/authorizer/src/main/res/values/strings.xml @@ -710,6 +710,7 @@ German German (Apple) German (CH) + Spanish (ES) French (CH) French (FR) Neo 2.0 @@ -721,6 +722,7 @@ @string/autotype_lang_german @string/autotype_lang_german_apple @string/autotype_lang_swiss_german + @string/autotype_lang_spanish @string/autotype_lang_swiss_french @string/autotype_lang_french_FR @string/autotype_lang_neo @@ -733,6 +735,7 @@ de_DE AppleMac_de_DE de_CH + es_ES fr_CH fr_FR neo