nightkr / flickboard

Flicking keyboard for Android
GNU Affero General Public License v3.0
117 stars 25 forks source link

Magic top-left key to implement complex characters #72

Open lud opened 7 months ago

lud commented 7 months ago

Context

I don't see if this is possible at the moment, but I think no.

Describe your suggested feature

In messageease, on the top-left square of the 9-grid, there is a © character that will enable combinations of letters.

So for instance cc© becomes ç, <<© becomes «, etc..

There are a lot, for instance I could do the "lambda" symbol for maths, but I can't remember the invocation. I cannot find the list of all possible combinations.

Would you consider implementing this feature?

Other details

No response

Acknowledgements

slashdevslashurandom commented 7 months ago

This feature would be reminiscent of the "Compose key" that is available on Linux systems.

Here is a list of X11 dead key and compose key combinations (in this situation we are looking for those that include Multi_key).

The only difference is that, when using the Compose key, one is supposed to input it first and then type in the keys for the character, so Compose o c makes the copyright symbol, Compose a e makes æ, Compose ^ j makes ĵ, etc.

nightkr commented 7 months ago

Yeah, I'd like to support this, I'm just not sure we're the correct place to maintain that kind of mapping table. Maybe if we can yoink something from CLDR or X11...

slashdevslashurandom commented 7 months ago

For comparison, this is how the developers of Unexpected Keyboard do character composing -- seems like they just have a list of predefined characters for specific accents, and if that's unavailable, either plug in a composing character codepoint or return failure.

As for the X11 database, it's usually taken from the libX11 source codes. In the libX11 source code file, the /libX11-1.8/nls/en_US.UTF-8/Compose.pre file contains most of the compose key definitions (including ones for non-Latin languages).

nightkr commented 7 months ago

Note to self: https://www.unicode.org/versions/Unicode15.1.0/ch03.pdf#G30602

nightkr commented 7 months ago

Online link to the Xlib compose definition: https://gitlab.freedesktop.org/xorg/lib/libx11/-/blob/041b5291f0956c5cda5054be2981c0d02b009a4c/nls/iso8859-1/Compose.pre

Phidica commented 7 months ago

I'm not sure if this will be useful, but I thought I'd include it in the discussion for completeness. @lud mentioned not being able to find a table of all the combinations supported in MessagEase, but I found one in the "How To..." section in the app and include it at the bottom of this comment.

While I suppose that some of these (like the accented letters) might be covered by an external library that could be relied upon by Flickboard, I think that others (like the maths symbols, punctuation, and Greek letters) are custom to MessagEase. For instance to complete @lud's example, typing a capital lambda is done with L and A.

I don't particularly mind if the required combination changes, but I think it would be nifty to be able to type some of these symbols with Flickboard.

MessagEase table of special characters | Symbol | Description | Combination | | :-: | - | :-: | | ƒ | script f | f and / | | " | low double comma quote | , and , | | … | horizontal ellipsis | . and . | | † | dagger | + and \| | | ‡ | double dagger | + and + | | ‰ | per mille | % and % | | Š | upper s hacek | S and ^ | | Œ | uppercase oe | O and E | | ' | single open comma quote | < and ' | | ' | single close comma quote | > and ' | | " | double open comma quote | \` and \` | | " | double close comma quote | ´ and ´ | | – | en dash | n and - | | — | em dash | m and - | | ˜ | spacing tilde | ~ and - | | ™ | trademark | T and M | | š | lowercase s hacek | s and ^ | | œ | lowercase oe chr | o and e | | Ÿ | uppercase Y diaeresis | Y and ¨ | | ¡ | inverted exclamation | ! and / | | ¢ | cent sign | c and / | | £ | pound sterling | L and - | | ¤ | general currency sign | o and = | | ¥ | yen sign | Y and = | | ¦ | broken vertical bar | \| and - | | § | section sign | S and / | | © | copyright | c and o | | « | left angle quote, guillemotleft | < and < | | ¬ | not sign | - and \| | | ® | registered trademark | o and r | | ¯ | macron accent | - and ^ | | ± | plus or minus | + and - | | ∓ | minus or plus | - and + | | ♂ | male sign | o and > | | ♀ | female sign | o and + | | ² | superscript two | 2 and ^ | | ³ | superscript three | 3 and ^ | | µ | micro sign | m and u | | ¶ | paragraph sign | p and p | | ¹ | superscript one | 1 and ^ | | » | right angle quote, guillemotright | > and > | | ¼ | fraction one-fourth | 1 and 4 | | ½ | fraction one-half | 1 and 2 | | ¾ | fraction three-fourths | 3 and 4 | | ¿ | inverted question mark | ? and / | | × | multiply sign | x and x | | ÷ | division sign | - and : | | ⁿ | Superscript n | n and ^ | | Ω | Ohm sign | o and h | | ∂ | Partial Differential | p and d | | √ | Square root sign | s and q | | √ | Square root sign | r and 2 | | ∞ | Infinity sign | o and o | | ∫ | Integral sign | s and \ | | ≈ | Almost equal sign | ~ and = | | ≠ | Not equal sign | / and = | | ≤ | Less than or equal to | < and = | | ≥ | Greater than or equal to | > and = | | ₣ | French Franc Sign | f and f | | ₤ | Italian Lira Sign | l and r | | ₧ | Spanish Peseta Sign | p and z | | ‽ | Interrobang | ! and ? | | À | capital a, grave accent | A and \` | | Á | capital a, acute accent | A and ´ | |  | capital a, circumflex accent | A and ^ | | à | capital a, tilde | A and ~ | | Ä | capital a, dieresis/umlaut mark | A and ¨ | | Å | capital a, ring | A and ° | | Æ | capital ae diphthong (ligature) | A and E | | Ą | capital a, ogonek (ligature) | A and C | | Ç | capital C, cedilla | C and C | | Č | capital C with háček | C and ^ | | Ć | capital C , acute accent | C and ´ | | Ð | capital eth, icelandic | D and - | | Ď | capital D with háček | D and ^ | | È | capital E, grave accent | E and \` | | É | capital E, acute accent | E and ´ | | Ê | capital E, circumflex accent | E and ^ | | Ë | capital E, dieresis/umlaut mark | E and ¨ | | Ě | capital E with háček | E and ^ | | Ę | capital E, ogonek (ligature) | E and C | | Ė | capital E, dot (ligature) | E and . | | Ì | capital i, grave accent | I and \` | | Í | capital i, acute accent | I and ´ | | Î | capital i, circumflex accent | I and ^ | | Ï | capital i, dieresis/umlaut mark | I and ¨ | | Į | capital i, ogonek (ligature) | I and C | | İ | capital i, dotted (Turkish) | I and . | | ı | small i, dottles (Turkish) | i and . | | Ğ | capital G, breve (Turkish) | G and ~ | | ğ | small g, breve (Turkish) | g and ~ | | Ň | capital N with háček | N and ^ | | Ñ | capital n, tilde | N and ~ | | Ò | capital o, grave accent | O and \` | | Ó | capital o, acute accent | O and ´ | | Ô | capital o, circumflex accent | O and ^ | | Õ | capital o, tilde | O and ~ | | Ö | capital o, dieresis/umlautmark | O and ¨ | | Ő | capital o, double acute /umlautmark | O and " | | Ø | capital o, slash | O and / | | Ř | capital R with háček | R and ^ | | Ť | capital T with háček | T and ^ | | Ù | capital u, grave accent | U and \` | | Ú | capital u, acute accent | U and ´ | | Û | capital u, circumflex accent | U and ^ | | Ü | capital u, dieresis/umlautmark | U and ¨ | | Ů | capital U with ring | U and ° | | Ű | capital U, double acute /umlautmark | U and " | | Ų | capital U, ogonek (ligature) | U and C | | Ū | capital U, bar (ligature) | U and - | | Ŭ | capital U, breve (ligature) | U and U | | Ŭ | capital U, breve (ligature) | U and u | | Ý | capital y, acute accent | Y and ´ | | Ž | capital Z with háček | Z and ^ | | Þ | capital thorn, icelandic | I and P | | ß | small sharp s, german (sz ligature) | s and s | | à | small a, grave accent | a and \` | | á | small a, acute accent | a and ´ | | â | small a, circumflex accent | a and ^ | | ã | small a, tilde | a and ~ | | ä | small a, dieresis/umlaut mark | a and ¨ | | å | small a, ring | a and ° | | æ | small ae diphthong (ligature) | a and e | | ą | small a, ogonek (ligature) | a and c | | ç | small c, cedilla | c and c | | č | small c with háček | c and ^ | | ć | small c, acute accent | c and ´ | | ð | small eth, icelandic | d and - | | ď | small d with háček | d and ^ | | è | small e, grave accent | e and \` | | é | small e, acute accent | e and ´ | | ê | small e, circumflex accent | e and ^ | | ë | small e, dieresis/umlaut mark | e and ¨ | | ě | small e with háček | e and ^ | | ę | small e, ogonek (ligature) | e and c | | ė | small e, dot (ligature) | e and . | | ì | small i, grave accent | i and \` | | í | small i, acute accent | i and ´ | | î | small i, circumflex accent | i and ^ | | ï | small i, dieresis/umlaut mark | i and ¨ | | į | small i, ogonek (ligature) | i and c | | ň | small n with háček | n and ^ | | ñ | small n, tilde | n and ~ | | ò | small o, grave accent | o and \` | | ó | small o, acute accent | o and ´ | | ô | small o, circumflex accent | o and ^ | | õ | small o, tilde | o and ~ | | ő | small o, double acute /umlautmark | o and " | | ö | small o, dieresis/umlaut mark | o and ¨ | | ø | small o, slash | o and / | | ř | small r with háček | r and ^ | | ŝ | small s with háček | s and ^ | | Ŝ | Capital S with háček | S and ^ | | š | small s with caron | s and ˇ | | Š | Capital S with caron | S and ˇ | | ş | small s with cedilla | s and > | | Ş | Capital S with cedilla | S and > | | ţ | small t with cedilla | t and > | | Ţ | Capital T with cedilla | T and > | | ť | small t with háček | t and ^ | | ù | small u, grave accent | u and \` | | ú | small u, acute accent | u and ´ | | û | small u, circumflex accent | u and ^ | | ü | small u, dieresis/umlaut mark | u and ¨ | | ů | small u with ring | u and ° | | ű | small u, double acute /umlautmark | u and " | | ų | small u, ogonek (ligature) | u and c | | ū | small u, bar (ligature) | u and - | | ŭ | small U, breve (ligature) | u and U | | ŭ | small U, breve (ligature) | u and u | | ý | small y, acute accent | y and ´ | | ž | small z with háček | z and ^ | | þ | small thorn, icelandic | i and p | | ÿ | small y, dieresis/umlaut mark | y and ¨ | | Α | Uppercase Alpha | A and L | | Β | Uppercase Beta | B and E | | Γ | Uppercase Gamma | G and A | | Δ | Uppercase Delta | D and E | | Ε | Uppercase Epsilon | E and P | | Ζ | Uppercase Zeta | Z and E | | Η | Uppercase Eta | E and T | | Θ | Uppercase Theta | T and E | | Ι | Uppercase Iota | I and O | | Κ | uppercase Kappa | K and A | | Λ | uppercase Lambda | L and A | | Μ | uppercase Mu | M and U | | Ν | uppercase Nu | N and U | | Ξ | uppercase Xi | X and I | | Ο | uppercase Omicron | O and N | | Π | uppercase Pi | P and I | | Ρ | uppercase Rho | R and O | | Σ | uppercase Sigma | S and I | | Τ | uppercase Tau | T and A | | Υ | uppercase Upsilon | U and P | | Φ | uppercase Phi | P and H | | Χ | uppercase Chi | C and H | | Ψ | uppercase Psi | P and S | | Ω | uppercase Omega | O and M | | α | Lowercase Alpha | a and l | | β | Lowercase Beta | b and e | | γ | Lowercase Gamma | g and a | | δ | Lowercase Delta | d and e | | ε | Lowercase Epsilon | e and p | | ζ | Lowercase Zeta | z and e | | η | Lowercase Eta | e and t | | θ | Lowercase Theta | t and e | | ι | Lowercase Iota | i and o | | κ | Lowercase Kappa | k and a | | λ | Lowercase Lambda | l and a | | μ | Lowercase Mu | m and u | | ν | Lowercase Nu | n and u | | ξ | Lowercase Xi | x and i | | ο | Lowercase Omicron | o and n | | π | Lowercase Pi | p and i | | ρ | Lowercase Rho | r and o | | ς | Lowercase Final Sigma | f and s | | σ | Lowercase Sigma | s and i | | τ | Lowercase Tau | t and a | | υ | Lowercase Upsilon | u and p | | φ | Lowercase Phi | p and h | | χ | Lowercase Chi | c and h | | ψ | Lowercase Psi | p and s | | ω | Lowercase Omega | o and m |
lverweijen commented 7 months ago

I know that vim and emacs use RFC1345 (with their own modifications) for making special characters, which has a lot of symbols.

It does have a few downsides that you may want to think about:

nightkr commented 7 months ago

@lverweijen

Yeah, hm.. that's a pretty big downside. But we can always make the source an option or something, and as you say it doesn't have to be the only way to enter characters.

@Phidica

Thanks for the list! Looking at it, it seems like there are basically two different "patterns" going on: "Character with accent" (a¨ -> ä) and "smash these two regular characters together" (ae -> æ). I think, ideally, the former should hopefully already be solved by dead letters/zalgo mode, so the latter is probably what I'd focus on for this.