Commit Graph

82 Commits

Author SHA1 Message Date
cc571ea1ca Refactor: Merge KeyValue.char and code fields
These two fields couldn't have an interesting value at the same time.

As we can no longer rely on a special value to distinguish between
what's the kind, the kind of the key is explicitly encoded in the two
most significative bits of the _flags field.

Extra nice thing: This removes the special values 'EVENT_NONE' and 'CHAR_NONE'.
2022-06-05 18:14:50 +02:00
c1a816d3d4 Refactor: Associate key events in KeyModifier
Two advantages:
- No need to distinguish modifiers in KeyEventHandler. The KeyValue is
  enough to decide what action to do.
- Keys are never a Char and Event at the same time, fields can be
  merged.
2022-06-05 17:46:28 +02:00
e10c587dc5 Refactor: Abstract KeyValue fields
The meaning of the public fields of KeyValue was quite complicated and
not handled consistently accross the app.

Make these fields private and add a more abstract API on top.

The meaning of these fields changed recently and it wasn't an easy
change. I plan on making more changes in the future.
2022-06-05 17:46:22 +02:00
02124dd71f Add combining 'accent_arrow_right'
It's the first modifier that uses combining diacritics. Whether it
should be represented as a modifier or a new kind of key can be
reconsidered later.
2022-06-05 13:51:09 +02:00
e4e54628b7 Add the 'accent_slash' modifier
Might be useful for some math characters.
2022-06-05 12:02:35 +02:00
4127aa6f03 Stop using flags for modifiers
There was no free bits left to add new modifiers. Instead of increasing
the width of the 'flags' field, refactor the way modifiers are
represented and used.

Modifers are now represented as independent values and stored in the
'code' field. A flag is added to distinguish between modifiers and keys
with a key event.

The most notable change is that modifiers can no longer be or-ed into a
single value but have to be represented as an array.
2022-06-05 01:43:58 +02:00
2900e8d197 Add Double acute diacritic
Will be used by the Hungarian language.
2022-04-24 01:15:41 +02:00
fec3f109c9 Add support for Lithuanian
Requires two new diacritics: ogonek and dot_above.

The new accents are also added to the Latvian layout as the two language
can be close but not to the other localized layouts. A new mechanism is
needed to reproducibly add extra keys to layouts without manual
placement.
2022-04-24 00:41:49 +02:00
5f47beb5b0 Add currency symbols under the Fn key
Fn+e = €
Fn+l = £
Fn+r = ₹
Fn+y = ¥
Fn+c = ¢
Fn+p = ₱
2022-04-02 16:56:40 +02:00
2dda39f453 Arrows and Box system (#114)
* Add `Arrows` and `Box` accent system
2022-04-02 16:42:40 +02:00
281f779121 µ, æ and œ also generated by Fn 2022-03-31 19:05:40 +02:00
6b3123090c Add arrows
Add simple arrows to the numeric keypad. Using the Fn key with these arrows will
output double arrows.
2022-03-31 19:05:40 +02:00
363a65223c Add non-breaking space as Fn+Space 2022-03-31 19:05:40 +02:00
4355225646 Add extra symbols to Fn
Also removed almost all combinations of diacritics and symbols to create extra
symbols.
2022-03-31 19:05:40 +02:00
ba6d62dee2 Add F11 and F12
These keys are shown only when Fn is activated, "placeholder" keys are
placed in the layouts.
2022-03-19 16:27:57 +01:00
a57bdf8cfb Avoid showing some symbols twice in Fn mode 2022-03-13 00:35:15 +01:00
04c84a8f66 Add Ord+* = ° 2022-02-19 21:01:52 +01:00
d2570bc2ea add-ordinal-numbers-symbol-system 2022-02-19 20:59:49 +01:00
7af579a1bc Fn+Tab to send the tab character 2022-01-29 20:03:17 +01:00
0bf7ff5f34 Add keys for Latvian
New accents - caron and macron - were defined and QWERTY layout was
updated to add accents for Latvian specific characters.
2022-01-20 22:01:34 +01:00
2764e96eb1 Change the key combination for °
To Fn+*

Was previously accent^+*, which was not available for most languages.
2022-01-01 19:00:27 +01:00
573c13fb82 Add Swedish
First add the 'ring' accent.
The swedish language uses the qwerty layout and three accents (aigu,
trema, ring)
2021-12-11 17:05:49 +01:00
5e5c7ef86a Add the euro and pound symbols
Fn+$ and Fn+# respectively.
2021-12-05 20:16:01 +01:00
ebfb8f3b39 Move the "Ins" key under Fn 2021-05-08 15:54:55 +02:00
6a19c7a56d Add french quotes, en- and em-dash
Add more keys under Fn. French quotes are S-<, S->, Fn-" and Fn-S-".
2021-05-08 15:51:47 +02:00
41dfa844f1 Move inverted punctuation to the tilde modifier 2021-05-08 02:03:23 +02:00
8fb89c5c71 Improve the numeric keyboard 2021-05-08 02:00:47 +02:00
abfa1cc8de Add '¿' and '¡' 2021-05-01 23:57:40 +02:00
d04e078816 Add more characters under accents
Notably subscript and superscript digits and some quote characters.
2021-04-19 23:10:00 +02:00
2200e2f313 Move some keys under the Fn modifier and move it on the bottom row 2021-04-19 22:29:20 +02:00
471375d50c Add function keys
Add the Fn modifier that change the digits into F1 to F10.
2021-04-18 23:58:35 +02:00
81803c406a Separate handling of modifiers from KeyValue class
KeyValue defines an ADT and some of its values, it now contains public
final fields and no internal logic.
KeyModifier handles modifiers and accents and creates new instances of
KeyValue when needed.
This operation is now properly cached.
2021-04-18 23:28:49 +02:00