mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2024-12-24 15:08:52 +01:00
Add Swedish
First add the 'ring' accent. The swedish language uses the qwerty layout and three accents (aigu, trema, ring)
This commit is contained in:
parent
58e37b484c
commit
573c13fb82
@ -14,7 +14,7 @@
|
|||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<key key0="q" key1="tab" />
|
<key key0="q" key1="tab" />
|
||||||
<key key0="s" />
|
<key key0="s" key1="accent_ring" />
|
||||||
<key key0="d" key1="accent_grave" key3="accent_aigu" />
|
<key key0="d" key1="accent_grave" key3="accent_aigu" />
|
||||||
<key key0="f" key3="{" key4="}" />
|
<key key0="f" key3="{" key4="}" />
|
||||||
<key key0="g" key3="[" key4="]" />
|
<key key0="g" key3="[" key4="]" />
|
||||||
|
@ -30,4 +30,11 @@
|
|||||||
android:isAsciiCapable="true"
|
android:isAsciiCapable="true"
|
||||||
android:imeSubtypeExtraValue="default_layout=qwerty,accents=grave|aigu"
|
android:imeSubtypeExtraValue="default_layout=qwerty,accents=grave|aigu"
|
||||||
/>
|
/>
|
||||||
|
<subtype android:label="@string/subtype_label"
|
||||||
|
android:languageTag="sv"
|
||||||
|
android:imeSubtypeLocale="sv_SE"
|
||||||
|
android:imeSubtypeMode="keyboard"
|
||||||
|
android:isAsciiCapable="true"
|
||||||
|
android:imeSubtypeExtraValue="default_layout=qwerty,accents=aigu|trema|ring"
|
||||||
|
/>
|
||||||
</input-method>
|
</input-method>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<key shift="0.5" key0="a" key1="tab" key2="`" />
|
<key shift="0.5" key0="a" key1="tab" key2="`" />
|
||||||
<key key0="s" />
|
<key key0="s" key1="accent_ring" />
|
||||||
<key key0="d" key1="accent_grave" key3="accent_aigu" />
|
<key key0="d" key1="accent_grave" key3="accent_aigu" />
|
||||||
<key key0="f" />
|
<key key0="f" />
|
||||||
<key key0="g" key2="-" key3="_" />
|
<key key0="g" key2="-" key3="_" />
|
||||||
|
@ -118,6 +118,7 @@ class Config
|
|||||||
case "tilde": return KeyValue.FLAG_ACCENT4;
|
case "tilde": return KeyValue.FLAG_ACCENT4;
|
||||||
case "cedille": return KeyValue.FLAG_ACCENT5;
|
case "cedille": return KeyValue.FLAG_ACCENT5;
|
||||||
case "trema": return KeyValue.FLAG_ACCENT6;
|
case "trema": return KeyValue.FLAG_ACCENT6;
|
||||||
|
case "ring": return KeyValue.FLAG_ACCENT_RING;
|
||||||
default: throw new RuntimeException(name);
|
default: throw new RuntimeException(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,6 +102,11 @@ class KeyModifier
|
|||||||
case '-': return '÷';
|
case '-': return '÷';
|
||||||
default: return (char)KeyCharacterMap.getDeadChar('\u00A8', c);
|
default: return (char)KeyCharacterMap.getDeadChar('\u00A8', c);
|
||||||
}
|
}
|
||||||
|
case KeyValue.FLAG_ACCENT_RING:
|
||||||
|
switch (c)
|
||||||
|
{
|
||||||
|
default: return (char)KeyCharacterMap.getDeadChar('\u02DA', c);
|
||||||
|
}
|
||||||
case KeyValue.FLAG_ACCENT_SUPERSCRIPT:
|
case KeyValue.FLAG_ACCENT_SUPERSCRIPT:
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
|
@ -41,10 +41,11 @@ class KeyValue
|
|||||||
public static final int FLAG_ACCENT6 = (1 << 21); // Tréma
|
public static final int FLAG_ACCENT6 = (1 << 21); // Tréma
|
||||||
public static final int FLAG_ACCENT_SUPERSCRIPT = (1 << 22);
|
public static final int FLAG_ACCENT_SUPERSCRIPT = (1 << 22);
|
||||||
public static final int FLAG_ACCENT_SUBSCRIPT = (1 << 23);
|
public static final int FLAG_ACCENT_SUBSCRIPT = (1 << 23);
|
||||||
|
public static final int FLAG_ACCENT_RING = (1 << 24);
|
||||||
|
|
||||||
public static final int FLAGS_ACCENTS = FLAG_ACCENT1 | FLAG_ACCENT2 |
|
public static final int FLAGS_ACCENTS = FLAG_ACCENT1 | FLAG_ACCENT2 |
|
||||||
FLAG_ACCENT3 | FLAG_ACCENT4 | FLAG_ACCENT5 | FLAG_ACCENT6 |
|
FLAG_ACCENT3 | FLAG_ACCENT4 | FLAG_ACCENT5 | FLAG_ACCENT6 |
|
||||||
FLAG_ACCENT_SUPERSCRIPT | FLAG_ACCENT_SUBSCRIPT;
|
FLAG_ACCENT_SUPERSCRIPT | FLAG_ACCENT_SUBSCRIPT | FLAG_ACCENT_RING;
|
||||||
|
|
||||||
public final String name;
|
public final String name;
|
||||||
public final String symbol;
|
public final String symbol;
|
||||||
@ -131,6 +132,7 @@ class KeyValue
|
|||||||
addModifierKey("accent_tilde", "◌̃", FLAG_ACCENT4);
|
addModifierKey("accent_tilde", "◌̃", FLAG_ACCENT4);
|
||||||
addModifierKey("accent_cedille", "◌̧", FLAG_ACCENT5);
|
addModifierKey("accent_cedille", "◌̧", FLAG_ACCENT5);
|
||||||
addModifierKey("accent_trema", "◌̈", FLAG_ACCENT6);
|
addModifierKey("accent_trema", "◌̈", FLAG_ACCENT6);
|
||||||
|
addModifierKey("accent_ring", "◌̊", FLAG_ACCENT_RING);
|
||||||
addModifierKey("superscript", "◌͆", FLAG_ACCENT_SUPERSCRIPT);
|
addModifierKey("superscript", "◌͆", FLAG_ACCENT_SUPERSCRIPT);
|
||||||
addModifierKey("subscript", "◌̺", FLAG_ACCENT_SUBSCRIPT);
|
addModifierKey("subscript", "◌̺", FLAG_ACCENT_SUBSCRIPT);
|
||||||
addModifierKey("fn", "Fn", FLAG_FN);
|
addModifierKey("fn", "Fn", FLAG_FN);
|
||||||
|
Loading…
Reference in New Issue
Block a user