made the Q key double as a trigger for the emoji overlay in the default mobile-intl layout

This makes the emoji overlay accessible without sacrificing an extra key.
There are (afaik) no languages with diacritics on the Q anyway and it's
the first letter key.

A small emoji will show as 2nd label on the keycap as a hint, the caveat
being that the hint applies to a long press rather than a shift-press as
with most 2nd labels, but better than no hint at all.
This commit is contained in:
Maarten van Gompel 2021-07-11 17:53:52 +02:00 committed by Hiltjo Posthuma
parent 3cff4547c5
commit 378a1c8b30
3 changed files with 38 additions and 8 deletions

View File

@ -69,10 +69,11 @@ through the ``SVKBD_LAYERS`` environment variable. They both take a comma separ
your ``layout.*.h``). Use the ``↺`` button in the bottom-left to cycle through all the layers in the exact order they your ``layout.*.h``). Use the ``↺`` button in the bottom-left to cycle through all the layers in the exact order they
were specified. were specified.
Some layouts come with overlays that will show when certain keys are hold pressed for a longer time. For Some layouts come with overlays that will show when certain keys are hold pressed for a longer time. For example, a long
example, a long press on the ``a`` key will enable an overview showing all kinds of diacritic combinations for ``a``. In press on the ``a`` key will enable an overview showing all kinds of diacritic combinations for ``a``. In the
the ``mobile-intl`` layout, a long press on a punctuation key will show an overlay with all further punctuation options ``mobile-intl`` layout, a long press on a punctuation key will show an overlay with all further punctuation options (the
(the same for all punctuation keys). same for all punctuation keys). Moreover, a long press on the ``q`` key doubles as a trigger for the emoji overlay in
this layout.
Overlay functionality interferes with the ability to hold a key and have it outputted repeatedly. You can disable Overlay functionality interferes with the ability to hold a key and have it outputted repeatedly. You can disable
overlay functionality with the ``-O`` flag or by setting the environment variable ``SVKBD_ENABLEOVERLAYS=0``. There is overlay functionality with the ``-O`` flag or by setting the environment variable ``SVKBD_ENABLEOVERLAYS=0``. There is

View File

@ -17,7 +17,7 @@ static Key keys_en[KEYS] = {
{ 0 }, /* New row */ { 0 }, /* New row */
{ "", 0, XK_Tab, 0.75 }, { "", 0, XK_Tab, 0.75 },
{ 0, 0, XK_q, 1 }, { 0, "🙂", XK_q, 1 },
{ 0, 0, XK_w, 1 }, { 0, 0, XK_w, 1 },
{ 0, 0, XK_e, 1 }, { 0, 0, XK_e, 1 },
{ 0, 0, XK_r, 1 }, { 0, 0, XK_r, 1 },
@ -68,7 +68,7 @@ static Key keys_en[KEYS] = {
}; };
static Key keys_minimal[KEYS] = { static Key keys_minimal[KEYS] = {
{ 0, 0, XK_q, 1 }, { 0, "🙂", XK_q, 1 },
{ 0, 0, XK_w, 1 }, { 0, 0, XK_w, 1 },
{ 0, 0, XK_e, 1 }, { 0, 0, XK_e, 1 },
{ 0, 0, XK_r, 1 }, { 0, 0, XK_r, 1 },
@ -113,7 +113,7 @@ static Key keys_minimal[KEYS] = {
{ "↲ Enter", 0, XK_Return, 2 }, { "↲ Enter", 0, XK_Return, 2 },
}; };
#define OVERLAYS 197 #define OVERLAYS 226
static Key overlay[OVERLAYS] = { static Key overlay[OVERLAYS] = {
{ 0, 0, XK_a }, //Overlay for a { 0, 0, XK_a }, //Overlay for a
{ "à", 0, XK_agrave }, { "à", 0, XK_agrave },
@ -283,6 +283,35 @@ static Key overlay[OVERLAYS] = {
{ "😳", 0, 0x101f633 }, { "😳", 0, 0x101f633 },
{ "😴", 0, 0x101f634 }, { "😴", 0, 0x101f634 },
{ 0, 0, XK_Cancel }, /* XK_Cancel signifies overlay boundary */ { 0, 0, XK_Cancel }, /* XK_Cancel signifies overlay boundary */
{ "q", 0, XK_q }, //New overlay -> emoji overlay on Q key (for minimal layer)
{ "😀", 0, 0x101f600 },
{ "😁", 0, 0x101f601 },
{ "😂", 0, 0x101f602 },
{ "😃", 0, 0x101f603 },
{ "😄", 0, 0x101f604 },
{ "😅", 0, 0x101f605 },
{ "😆", 0, 0x101f606 },
{ "😇", 0, 0x101f607 },
{ "😈", 0, 0x101f608 },
{ "😉", 0, 0x101f609 },
{ "😊", 0, 0x101f60a },
{ "😋", 0, 0x101f60b },
{ "😌", 0, 0x101f60c },
{ "😍", 0, 0x101f60d },
{ "😎", 0, 0x101f60e },
{ "😏", 0, 0x101f60f },
{ "😐", 0, 0x101f610 },
{ "😒", 0, 0x101f612 },
{ "😓", 0, 0x101f613 },
{ "😛", 0, 0x101f61b },
{ "😮", 0, 0x101f62e },
{ "😟", 0, 0x101f61f },
{ "😟", 0, 0x101f620 },
{ "😢", 0, 0x101f622 },
{ "😭", 0, 0x101f62d },
{ "😳", 0, 0x101f633 },
{ "😴", 0, 0x101f634 },
{ 0, 0, XK_Cancel }, /* XK_Cancel signifies overlay boundary */
{ "/?", 0, XK_slash }, //New overlay - punctuation overlay { "/?", 0, XK_slash }, //New overlay - punctuation overlay
{ "1", "!", XK_1, 1 }, { "1", "!", XK_1, 1 },
{ "2", "@", XK_2, 1 }, { "2", "@", XK_2, 1 },

View File

@ -351,7 +351,7 @@ static Key overlay[OVERLAYS] = {
{ "😒", 0, 0x101f612 }, { "😒", 0, 0x101f612 },
{ "😓", 0, 0x101f613 }, { "😓", 0, 0x101f613 },
{ "😛", 0, 0x101f61b }, { "😛", 0, 0x101f61b },
{ "😮", 0, 0x101f62e, 2 }, // skip shift { "😮", 0, 0x101f62e },
{ "😟", 0, 0x101f61f }, { "😟", 0, 0x101f61f },
{ "😟", 0, 0x101f620 }, { "😟", 0, 0x101f620 },
{ "😢", 0, 0x101f622 }, { "😢", 0, 0x101f622 },