From e1304eb75ae4ac828b8fe33f62d7aecc7071f067 Mon Sep 17 00:00:00 2001 From: kompowiec2 Date: Sun, 19 Aug 2018 18:08:03 +0200 Subject: [PATCH] add dolar sign and special command --- .../net/iowaline/dotdash/DotDashIMEService.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/net/iowaline/dotdash/DotDashIMEService.java b/app/src/main/java/net/iowaline/dotdash/DotDashIMEService.java index 835ad4d..708f332 100644 --- a/app/src/main/java/net/iowaline/dotdash/DotDashIMEService.java +++ b/app/src/main/java/net/iowaline/dotdash/DotDashIMEService.java @@ -99,6 +99,7 @@ public void onCreate() { this.autocommit = this.prefs.getBoolean("autocommit", false); // TODO Replace this with an XML file + //International morse code 1920 morseMap = new Hashtable<>(); morseMap.put(".-", "a"); morseMap.put("-...", "b"); @@ -136,6 +137,7 @@ public void onCreate() { morseMap.put("---..", "8"); morseMap.put("----.", "9"); morseMap.put("-----", "0"); + //Punctuation marks and symbols morseMap.put(".----.", "\'"); morseMap.put(".--.-.", "@"); morseMap.put(".-...", "&"); @@ -155,6 +157,7 @@ public void onCreate() { morseMap.put("-.-.-.", ";"); morseMap.put("-..-.", "/"); morseMap.put("..--.-", "_"); + morseMap.put("-....-", "—"); // Aaron Wells' custom additions to Morse code morseMap.put("....--", "#"); morseMap.put("-.-.-", "*"); @@ -169,7 +172,18 @@ public void onCreate() { morseMap.put(".--.---", "^"); morseMap.put(".-..-", "\\"); morseMap.put(".--...", "|"); - + morseMap.put("...-..-", "$"); + //special commands + //morseMap.put(".-.-", "UNKNOWN STATION"); + morseMap.put(".-.-.", "OUT"); + morseMap.put("...-.", "Verified"); + morseMap.put("..-.-", "INTERROGATIVE"); + morseMap.put("........", "CORRECTION"); + //morseMap.put(".-.-.", "TRANSMISSION; OUT"); + morseMap.put("-...-", "BREAK"); + morseMap.put("-.-.-", "ATTENTION"); + morseMap.put("...---...", "SOS"); + updateNewlinePref(); // This variable is used in onKey to determine how many