mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2024-11-22 15:23:11 +01:00
Add the 'accent_slash' modifier
Might be useful for some math characters.
This commit is contained in:
parent
4127aa6f03
commit
e4e54628b7
@ -62,6 +62,8 @@ class KeyModifier
|
||||
return maybe_modify_char(k, map_char_arrows(k.char_));
|
||||
case KeyValue.MOD_BOX:
|
||||
return maybe_modify_char(k, map_char_box(k.char_));
|
||||
case KeyValue.MOD_SLASH:
|
||||
return maybe_modify_char(k, map_char_slash(k.char_));
|
||||
default: return k;
|
||||
}
|
||||
}
|
||||
@ -329,4 +331,20 @@ class KeyModifier
|
||||
default: return c;
|
||||
}
|
||||
}
|
||||
|
||||
private static char map_char_slash(char c)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case 'a': return 'ⱥ';
|
||||
case 'c': return 'ȼ';
|
||||
case 'e': return 'ɇ';
|
||||
case 'g': return 'ꞡ';
|
||||
case 'l': return 'ł';
|
||||
case 'n': return 'ꞥ';
|
||||
case 'o': return 'ø';
|
||||
case ' ': return '/';
|
||||
default: return c;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ class KeyValue
|
||||
public static final int MOD_ARROWS = -214;
|
||||
public static final int MOD_BOX = -215;
|
||||
public static final int MOD_OGONEK = -216;
|
||||
public static final int MOD_SLASH = -217;
|
||||
|
||||
/** Special value for the [char_] field. */
|
||||
public static final char CHAR_NONE = '\0';
|
||||
@ -185,6 +186,8 @@ class KeyValue
|
||||
addModifierKey("accent_ogonek", "\u0059", MOD_OGONEK, FLAG_KEY_FONT);
|
||||
addModifierKey("accent_dot_above", "\u005a", MOD_DOT_ABOVE, FLAG_KEY_FONT);
|
||||
addModifierKey("accent_double_aigu", "\u005b", MOD_DOUBLE_AIGU, FLAG_KEY_FONT);
|
||||
addModifierKey("accent_slash", "\134", // Can't write u005c
|
||||
MOD_SLASH, FLAG_KEY_FONT);
|
||||
addModifierKey("superscript", "Sup", MOD_SUPERSCRIPT, FLAG_SMALLER_FONT);
|
||||
addModifierKey("subscript", "Sub", MOD_SUBSCRIPT, FLAG_SMALLER_FONT);
|
||||
addModifierKey("ordinal", "Ord", MOD_ORDINAL, FLAG_SMALLER_FONT);
|
||||
|
10
srcs/special_font/5C.svg
Normal file
10
srcs/special_font/5C.svg
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="-20 0 2068 2048">
|
||||
<path fill="currentColor"
|
||||
d="M931.256 533.22l-69.3145 69.3145q-112.472 -86.3154 -249.792 -98.0859v-99.3945q176.555 11.7715 319.106 128.166v0zM516.679 504.45q-133.396 10.4619 -249.792 100.701q0 -1.30859 -71.9297 -74.5449l2.61523 2.61523q142.554 -116.396 319.106 -128.166v99.3945v0z
|
||||
M197.572 675.771q-90.2393 103.316 -107.24 245.867h-99.3936q17.001 -181.786 137.32 -319.104l-6.53906 -5.23145l3.92285 2.61523l41.8506 43.1582q30.0791 31.3867 30.0791 32.6953v0zM1137.89 921.639h-99.3936q-17.001 -141.242 -107.239 -248.483l69.3135 -70.6211
|
||||
q120.318 137.319 137.319 319.104v0zM1137.89 1018.42q-14.3857 189.633 -129.474 326.953l-69.3135 -70.6221q86.3154 -111.164 99.3936 -256.331h99.3936v0zM189.726 1272.13h0.000976562q-86.3154 -107.239 -99.3936 -253.716h-99.3945q13.0781 189.633 128.165 326.953
|
||||
l-3.92285 3.92383q-1.30762 0 74.5449 -77.1611zM939.103 1414.68q-146.476 124.242 -326.952 136.014v-99.3945q139.935 -11.7705 257.639 -105.934zM516.679 1550.7q-180.478 -11.7715 -326.953 -136.013l69.3145 -69.3145q117.703 90.2383 257.64 105.933v99.3945
|
||||
h-0.000976562zM198 1670l661 -1343h129zM990 330l-665 1341h-129z" />
|
||||
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
Loading…
Reference in New Issue
Block a user