abouttreesummaryrefslogcommitdiff
diff options
context:
space:
mode:
authorjuloo2015-08-18 01:33:50 +0200
committerjuloo2015-08-18 01:33:50 +0200
commit373f1b11f17d2f1ea8832085e35cf2e59d7d55d2 (patch)
tree4f4a2153ebd8048e2cd1b04181a9395aa190bbbd
parentd81509d7ec2336c34326a2d19109e4b78cccd97c (diff)
downloadunexpected-keyboard-373f1b11f17d2f1ea8832085e35cf2e59d7d55d2.tar.gz
unexpected-keyboard-373f1b11f17d2f1ea8832085e35cf2e59d7d55d2.zip
Add trema accent + Add accents to azerty
-rw-r--r--res/xml/azerty.xml14
-rw-r--r--res/xml/qwerty.xml2
-rw-r--r--srcs/juloo.keyboard2/KeyValue.java4
3 files changed, 12 insertions, 8 deletions
diff --git a/res/xml/azerty.xml b/res/xml/azerty.xml
index e419b60..01aad63 100644
--- a/res/xml/azerty.xml
+++ b/res/xml/azerty.xml
@@ -2,15 +2,15 @@
<keyboard>
<row>
<key key0="a" key2="1" key3="&amp;" />
- <key key0="z" key2="2" key3="é" key4="~" />
+ <key key0="z" key2="2" key3="accent2" key4="~" />
<key key0="e" key2="3" key3="&quot;" key4="\#" />
<key key0="r" key2="4" key3="'" key4="{" />
<key key0="t" key2="5" key3="(" key4="[" />
<key key0="y" key2="6" key3="-" key4="|" />
- <key key0="u" key2="7" key3="è" key4="`" />
+ <key key0="u" key2="7" key3="accent1" key4="`" />
<key key0="i" key2="8" key3="_" key4="\" />
- <key key0="o" key2="9" key3="ç" key4="^" />
- <key key0="p" key2="0" key3="à" key4="\@" />
+ <key key0="o" key2="9" key3="accent5" key4="^" />
+ <key key0="p" key2="0" key4="\@" />
</row>
<row>
<key key0="q" key1="tab" />
@@ -19,9 +19,9 @@
<key key0="f" />
<key key0="g" key2="°" key3=")" key4="]" />
<key key0="h" key2="+" key3="=" key4="}" />
- <key key0="j" key2="¨" key3="^" />
- <key key0="k" key1="ë" key2="£" key3="$" key4="ê" />
- <key key0="l" key2="%" key4="ù" />
+ <key key0="j" key2="accent6" key3="^" />
+ <key key0="k" key2="£" key3="$" key4="accent3" />
+ <key key0="l" key1="accent4" key2="%" />
<key key0="m" key2="µ" key4="*" />
</row>
<row>
diff --git a/res/xml/qwerty.xml b/res/xml/qwerty.xml
index 4ae25c5..6f1ec0e 100644
--- a/res/xml/qwerty.xml
+++ b/res/xml/qwerty.xml
@@ -14,7 +14,7 @@
</row>
<row>
<key key0="a" key1="tab" />
- <key key0="s" key1="accent1" key2="accent2" />
+ <key key0="s" key1="accent1" key2="accent2" key4="accent6" />
<key key0="d" key1="accent3" key2="accent4" key3="accent5" />
<key key0="f" />
<key key0="g" key2="-" key3="_" />
diff --git a/srcs/juloo.keyboard2/KeyValue.java b/srcs/juloo.keyboard2/KeyValue.java
index da0d4a6..ecda632 100644
--- a/srcs/juloo.keyboard2/KeyValue.java
+++ b/srcs/juloo.keyboard2/KeyValue.java
@@ -23,6 +23,7 @@ class KeyValue
public static final int FLAG_ACCENT3 = (1 << 18);
public static final int FLAG_ACCENT4 = (1 << 19);
public static final int FLAG_ACCENT5 = (1 << 20);
+ public static final int FLAG_ACCENT6 = (1 << 21);
private String _name;
private String _symbol;
@@ -59,6 +60,8 @@ class KeyValue
c = (char)KeyCharacterMap.getDeadChar('\u02DC', (int)c);
if ((flags & FLAG_ACCENT5) != 0)
c = (char)KeyCharacterMap.getDeadChar('\u00B8', (int)c);
+ if ((flags & FLAG_ACCENT6) != 0)
+ c = (char)KeyCharacterMap.getDeadChar('\u00A8', (int)c);
if (c != 0)
return (c);
}
@@ -111,6 +114,7 @@ class KeyValue
new KeyValue("accent3", "\u02C6", CHAR_NONE, EVENT_NONE, FLAG_KEEP_ON | FLAG_NOCHAR | FLAG_ACCENT3);
new KeyValue("accent4", "\u02DC", CHAR_NONE, EVENT_NONE, FLAG_KEEP_ON | FLAG_NOCHAR | FLAG_ACCENT4);
new KeyValue("accent5", "\u00B8", CHAR_NONE, EVENT_NONE, FLAG_KEEP_ON | FLAG_NOCHAR | FLAG_ACCENT5);
+ new KeyValue("accent6", "\u00A8", CHAR_NONE, EVENT_NONE, FLAG_KEEP_ON | FLAG_NOCHAR | FLAG_ACCENT6);
new KeyValue("a", null, 'a', KeyEvent.KEYCODE_A, 0);
new KeyValue("b", null, 'b', KeyEvent.KEYCODE_B, 0);