Move the emoji selector onto the Alt key top-right corner

Standalone top-row emoji key replaced by a badge in the Alt key key2 swipe slot, drawn as a smile-in-a-circle glyph: new special-font codepoint 0xE01D from Font Awesome face-smile, rebuilt into assets/special_font.ttf with fontforge. Corner slots carry FLAG_SECONDARY so labelColor dims them to secondaryLabelColor; the badge overrides to _theme.labelColor to match the rest of the keyboard labels, and is identified by its codepoint rather than an Event or Kind accessor, because those are only valid for specific kinds and crashed the IME when called unguarded in the draw path. Swipe toward the key top-right to reach it; the config gear stays in the bottom-left. check_layout.output excluded on purpose - unrelated latn_neo2 drift.
This commit is contained in:
Nyra
2026-09-27 14:16:47 +00:00
parent 0f2f8a47ff
commit 5cba22a19a
6 changed files with 9 additions and 3 deletions
Binary file not shown.
+1 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<row height="0.95">
<key width="1.5" role="action" key0="ctrl" key1="loc meta" key3="loc switch_clipboard"/>
<key width="1.3" role="action" key0="alt" key3="config"/>
<key width="1.3" role="action" key0="alt" key2="switch_emoji" key3="config"/>
<key width="1.0" role="action" key7="pgup" key8="pgdn"/>
<key width="4.5" role="space_bar" key0="space" key7="switch_forward" key8="switch_backward" key5="cursor_left" key6="cursor_right"/>
<key width="1.0" role="action" key7="up" key8="down"/>
+1 -1
View File
@@ -645,7 +645,7 @@ public final class KeyValue implements Comparable<KeyValue>
case "switch_text": return eventKey("ABC", Event.SWITCH_TEXT, FLAG_SMALLER_FONT);
case "switch_fn": return eventKey("Fn", Event.SWITCH_FN, FLAG_SMALLER_FONT);
case "switch_numeric": return eventKey("123+", Event.SWITCH_NUMERIC, FLAG_SMALLER_FONT);
case "switch_emoji": return eventKey("\u263A", Event.SWITCH_EMOJI, FLAG_SMALLER_FONT);
case "switch_emoji": return eventKey(0xE01D, Event.SWITCH_EMOJI, FLAG_SMALLER_FONT);
case "switch_back_emoji": return eventKey("ABC", Event.SWITCH_BACK_EMOJI, 0);
case "switch_clipboard": return eventKey(0xE017, Event.SWITCH_CLIPBOARD, 0);
case "switch_back_clipboard": return eventKey("ABC", Event.SWITCH_BACK_CLIPBOARD, 0);
+6
View File
@@ -450,6 +450,12 @@ public class Keyboard2View extends View
&& KeyValue.Editing.SPACE_BAR.equals(kv.getEditing())
? DeepSeekPeak.colorFor(System.currentTimeMillis())
: labelColor(kv, isKeyDown, false);
// The emoji badge (0xE01D, Alt's top-right corner) sits in a corner slot,
// which labelColor() would dim to secondaryLabelColor. Draw it in labelColor
// so it matches the rest of the keyboard's labels.
String glyph = kv.getString();
if (glyph != null && glyph.length() == 1 && glyph.charAt(0) == 0xE01D)
color = _theme.labelColor;
Paint p = tc.label_paint(kv.hasFlagsAny(KeyValue.FLAG_KEY_FONT), color, textSize);
canvas.drawText(kv.getString(), x, (keyH - p.ascent() - p.descent()) / 2f + y, p);
}
-1
View File
@@ -49,7 +49,6 @@ Useful links.
<key c="i" nw="8" sw="*"/>
<key c="o" nw="9" sw="(" se=")"/>
<key c="p" nw="0" sw="-" se="_"/>
<key c="switch_emoji"/>
</row>
<row>
<key shift="0.5" c="a" nw="loc tab"/>
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2022 Fonticons, Inc. --><path d="M256 352C293.2 352 319.2 334.5 334.4 318.1C343.3 308.4 358.5 307.7 368.3 316.7C378 325.7 378.6 340.9 369.6 350.6C347.7 374.5 309.7 400 256 400C202.3 400 164.3 374.5 142.4 350.6C133.4 340.9 133.1 325.7 143.7 316.7C153.5 307.7 168.7 308.4 177.6 318.1C192.8 334.5 218.8 352 256 352zM208.4 208C208.4 225.7 194 240 176.4 240C158.7 240 144.4 225.7 144.4 208C144.4 190.3 158.7 176 176.4 176C194 176 208.4 190.3 208.4 208zM304.4 208C304.4 190.3 318.7 176 336.4 176C354 176 368.4 190.3 368.4 208C368.4 225.7 354 240 336.4 240C318.7 240 304.4 225.7 304.4 208zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"/></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB