mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2025-06-21 18:23:27 +02:00
Add a glyph for cancelling the compose key
This commit is contained in:
parent
96dabde7c8
commit
d3753cc455
Binary file not shown.
@ -17,7 +17,7 @@ public final class ComposeKey
|
|||||||
return res;
|
return res;
|
||||||
/* Tapping compose again exits the pending sequence. */
|
/* Tapping compose again exits the pending sequence. */
|
||||||
case Compose_pending:
|
case Compose_pending:
|
||||||
return KeyValue.nothingKey(kv);
|
return KeyValue.getKeyByName("compose_cancel");
|
||||||
/* These keys are not greyed. */
|
/* These keys are not greyed. */
|
||||||
case Event:
|
case Event:
|
||||||
case Modifier:
|
case Modifier:
|
||||||
|
@ -80,7 +80,7 @@ public final class KeyValue implements Comparable<KeyValue>
|
|||||||
public static enum Placeholder
|
public static enum Placeholder
|
||||||
{
|
{
|
||||||
REMOVED,
|
REMOVED,
|
||||||
NOTHING,
|
COMPOSE_CANCEL,
|
||||||
F11,
|
F11,
|
||||||
F12,
|
F12,
|
||||||
SHINDOT,
|
SHINDOT,
|
||||||
@ -381,14 +381,10 @@ public final class KeyValue implements Comparable<KeyValue>
|
|||||||
return new KeyValue("", Kind.Placeholder, id.ordinal(), 0);
|
return new KeyValue("", Kind.Placeholder, id.ordinal(), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Make a key that does nothing, inheriting the symbol from an other key. */
|
private static KeyValue placeholderKey(int symbol, Placeholder id, int flags)
|
||||||
public static KeyValue nothingKey(KeyValue inherit)
|
|
||||||
{
|
{
|
||||||
// Keep only appearance flags
|
return new KeyValue(String.valueOf((char)symbol), Kind.Placeholder,
|
||||||
int flags = inherit.getFlags() & (FLAG_SPECIAL | FLAG_GREYED |
|
id.ordinal(), flags | FLAG_KEY_FONT);
|
||||||
FLAG_KEY_FONT | FLAG_SMALLER_FONT | FLAG_SECONDARY);
|
|
||||||
return new KeyValue(inherit.getString(), Kind.Placeholder,
|
|
||||||
Placeholder.NOTHING.ordinal(), flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static KeyValue makeStringKey(String str)
|
public static KeyValue makeStringKey(String str)
|
||||||
@ -698,6 +694,7 @@ public final class KeyValue implements Comparable<KeyValue>
|
|||||||
|
|
||||||
/* The compose key */
|
/* The compose key */
|
||||||
case "compose": return makeComposePending(0xE016, ComposeKeyData.compose, FLAG_SECONDARY | FLAG_SPECIAL);
|
case "compose": return makeComposePending(0xE016, ComposeKeyData.compose, FLAG_SECONDARY | FLAG_SPECIAL);
|
||||||
|
case "compose_cancel": return placeholderKey(0xE01A, Placeholder.COMPOSE_CANCEL, FLAG_SECONDARY | FLAG_SPECIAL);
|
||||||
|
|
||||||
/* Placeholder keys */
|
/* Placeholder keys */
|
||||||
case "removed": return placeholderKey(Placeholder.REMOVED);
|
case "removed": return placeholderKey(Placeholder.REMOVED);
|
||||||
|
9
srcs/special_font/01A.svg
Normal file
9
srcs/special_font/01A.svg
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Inspired from https://commons.wikimedia.org/w/index.php?curid=20206736 -->
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" version="1.1" viewBox="0 0 200 200">
|
||||||
|
<g fill="none">
|
||||||
|
<line x1="100" y1="45" x2="100" y2="155" stroke="#000" stroke-width="10"/>
|
||||||
|
<circle cx="100" cy="100" r="55" stroke="#000" stroke-width="10"/>
|
||||||
|
<line x1="45" y1="45" x2="155" y2="155" stroke="#000" stroke-width="10"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 481 B |
Loading…
x
Reference in New Issue
Block a user