Author Topic: Entering other characters  (Read 2623 times)

gidds

  • Sr. Member
  • ****
  • Posts: 324
    • View Profile
Entering other characters
« on: June 25, 2018, 12:49:39 pm »
In Android, you can directly type all the characters you can see on your physical keyboard (assuming it's set up correctly): letters, digits, and all the common symbols.

You can probably also type some extras: for example, in some apps, Alt+E seems to be a dead key for an acute accent, so Alt+E followed by E enters é (just as on a Mac).

And you can also type many more characters using one of the pop-ups; in my UK layout, Fn+. pops up a list of emoji that you can tap on, and Fn+, pops up a list of symbols.

However, there are still many other symbols not covered by the above — including some I use a lot, such as long dashes, curly quotes, hard space, ellipsis, degree, and fractions.  How can you enter characters such as those?

The only options I know about so far are:
  • Copy and paste from somewhere, e.g. a file in an editor or browser: very slow and awkward.
  • Install an app providing a special on-screen keyboard with those characters: very awkward, and limited to a particular selection.
  • Install an app providing key shortcuts, and configure it for the characters you need: not sure if that's possible, and again necessarily limited to a small selection of chars.
Are there any better approaches?

(On the Psion 5 series, you could press Shift+Ctrl+Fn+C at any time to get a pop-up list of every character.  Though that used CP1252 AKA Windows Latin-1, so there were only 128 chars not already covered.  And you could also hold down Ctrl and type the decimal number of the character — less intuitive, but it did provide a way of entering any possible character.  Does Android have any equivalent to either of these?)
   Andy/
Psion 3a → Psion 5 → Psion 5mx → Gemini → Astro

Eeems

  • Newbie
  • *
  • Posts: 11
    • View Profile
Entering other characters
« Reply #1 on: June 25, 2018, 01:32:07 pm »
fn+, will open up the onscreen symbol keyboard. fn+. will open up the onscreen emojii keyboard and pressing and holding on a key will bring up a popup of alternative characters to enter.

gidds

  • Sr. Member
  • ****
  • Posts: 324
    • View Profile
Entering other characters
« Reply #2 on: June 25, 2018, 01:40:12 pm »
Quote from: Eeems
fn+, will open up the onscreen symbol keyboard.

Yes, I know -- I mentioned that.  But it doesn't include curly quotes or any of the other characters I asked about.
   Andy/
Psion 3a → Psion 5 → Psion 5mx → Gemini → Astro

zevv

  • Newbie
  • *
  • Posts: 48
    • View Profile
Entering other characters
« Reply #3 on: June 25, 2018, 03:22:55 pm »
Quote from: Eeems
fn+, will open up the onscreen symbol keyboard. fn+. will open up the onscreen emojii keyboard and pressing and holding on a key will bring up a popup of alternative characters to enter.

Funny, but that never worked for me. Fn-sym and Fn+? simple do nothing at all - is this due to a faulty keyboard setting somewhere?

Pete G.

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
    • http://www.GoodeveCA.net
Entering other characters
« Reply #4 on: June 25, 2018, 10:49:51 pm »
Quote from: gidds
In Android, you can directly type all the characters you can see on your physical keyboard (assuming it's set up correctly): letters, digits, and all the common symbols.

You can probably also type some extras: for example, in some apps, Alt+E seems to be a dead key for an acute accent, so Alt+E followed by E enters é (just as on a Mac).

And you can also type many more characters using one of the pop-ups; in my UK layout, Fn+. pops up a list of emoji that you can tap on, and Fn+, pops up a list of symbols.

However, there are still many other symbols not covered by the above — including some I use a lot, such as long dashes, curly quotes, hard space, ellipsis, degree, and fractions.  How can you enter characters such as those?

Thanks for the tip about Alt+E etc.  I'd never spotted that.

On my US keyboard, however, the popup symbols do include the degree, and common fractions (1/2,3/4 etc -- not using my Gemini so I can't show them!) are among the Alt+... set.  Haven't found any curly quotes or long dashes, though.  But I've never been able to generate them from any other K/B, either.

My solution was to write a variant of the "smartypants" program (which generates HTML entities) that takes text with ascii quotes, double-dashes, and so on, and figures out where to substitute the 'smart' UTF8 characters. Seems to get it right nearly all the time!  I seem to have both a Python and a Perl version (can't remember quite why...) but for some reason I've only made the Perl one available.  Haven't tried yet, but it should run fine in Termux.  If anybody wants to play with it, it's at:
http://goodeveca.net/Cutief8/

Pete G.

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
    • http://www.GoodeveCA.net
Entering other characters
« Reply #5 on: June 26, 2018, 01:54:30 am »
Quote from: Pete G.
My solution was to write a variant of the "smartypants" program (which generates HTML entities) that takes text with ascii quotes, double-dashes, and so on, and figures out where to substitute the 'smart' UTF8 characters. Seems to get it right nearly all the time!  I seem to have both a Python and a Perl version (can't remember quite why...) but for some reason I've only made the Perl one available.  Haven't tried yet, but it should run fine in Termux.  If anybody wants to play with it, it's at:
http://goodeveca.net/Cutief8/
mve

Checked, and it does... Provided, of course, you've installed perl; you also have to change the shebang from:

    #!/bin/env perl -w
to

   #!/data/data/com.termux/files/usr/bin/perl -w

(It looks like Termux doesn't have 'env' somehow, so termux-fix-shebang doesn't quite work.)

Eeems

  • Newbie
  • *
  • Posts: 11
    • View Profile
Entering other characters
« Reply #6 on: June 26, 2018, 09:04:58 am »
You can get at some of the characters via the symbol keyboard by pressing and holding on keys. The elipses is available there by longpress on the period. Others you probably can't get at without a third party keyboard app or copy/paste.

Quote from: zevv
Quote from: Eeems
fn+, will open up the onscreen symbol keyboard. fn+. will open up the onscreen emojii keyboard and pressing and holding on a key will bring up a popup of alternative characters to enter.

Funny, but that never worked for me. Fn-sym and Fn+? simple do nothing at all - is this due to a faulty keyboard setting somewhere?
You may have to ensure that your keyboard layout is set to en-us and that you are using the gemini keyboard instead of gboard.
« Last Edit: June 26, 2018, 09:07:40 am by Eeems »

gidds

  • Sr. Member
  • ****
  • Posts: 324
    • View Profile
Entering other characters
« Reply #7 on: June 26, 2018, 10:38:34 am »
I've found another special case: in vim, you can enter a wide range of characters as digraphs, by pressing Ctrl+K and then the digraph.  For example, a curly left single quote is Ctrl+K ' 6.  You can see the whole list by typing :digraphs<Enter>.


Pete's suggestion is valid — in fact, I've written programs like that myself, but such a program is always approximate, as there's no general way to be sure what was intended.  So it's only useful where you're going to be carefully reviewing the output.

Also, it's only suitable for batch-type processing, where you create the file, then stop and convert it.  So it's far too awkward to use while entering text.

And, worst of all, it only applies when you're working on a file.  So it's no help when composing, say, a post on your favourite web site…
   Andy/
Psion 3a → Psion 5 → Psion 5mx → Gemini → Astro

loop

  • Newbie
  • *
  • Posts: 19
    • View Profile
Entering other characters
« Reply #8 on: June 26, 2018, 11:51:54 am »
Quote from: zevv
Quote from: Eeems
fn+, will open up the onscreen symbol keyboard. fn+. will open up the onscreen emojii keyboard and pressing and holding on a key will bring up a popup of alternative characters to enter.

Funny, but that never worked for me. Fn-sym and Fn+? simple do nothing at all - is this due to a faulty keyboard setting somewhere?

Gemini Keyboard -> Advanced -> Emoji for physical keyboard (enable)

Pete G.

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
    • http://www.GoodeveCA.net
Entering other characters
« Reply #9 on: June 26, 2018, 07:17:54 pm »
Quote from: Eeems
You can get at some of the characters via the symbol keyboard by pressing and holding on keys. The elipses is available there by longpress on the period. Others you probably can't get at without a third party keyboard app or copy/paste.

Oohh... I've learnt something new again!  
In fact, on my unit (US K/B) nearly all the virtual symbol keys have long-press alternatives.  e.g. on the "?123" version of the keyset, long pressing on the hyphen lets you select em or en dash or underline.  The quote characters will provide the relevant "smart quotes".  The "=\<" set also have lots of extras.  You can have fun exploring all the choices on the other keys...  

I'll ask for this to be added to the "Tips" post in the General Discussion.

gidds

  • Sr. Member
  • ****
  • Posts: 324
    • View Profile
Entering other characters
« Reply #10 on: June 27, 2018, 04:36:06 am »
Quote from: Eeems
You can get at some of the characters via the symbol keyboard by pressing and holding on keys.

EDIT: I'm afraid misunderstood that comment — and it's a rather good point!

I was confusing it with long presses on the physical keyboard.  Holding down e.g. the ‘a’ key pops up a list of related characters (æ ã å à á â ä &c).  But that only works for some letters, and no symbols.  And I had to disable that setting (Gemini Keyboard Settings app -> Preferences -> Show alternative keys on longpress), as it prevents you using autorepeat on keys which I use a lot in e.g. vim.

However, the virtual keyboard has related characters behind most of the symbols as well.  For example, if you press Fn+, to show the symbol panel, press the bottom-left button* to show the digits and basic symbols, then tapping and holding on the hyphen, you get a pop-up with em dash, underscore, en dash, and bullet.  (* Confusingly, the bottom-left button is labelled ‘ABC’; I suspect the label has got mixed up with the ‘?123’ button just above, which does show the letters…)

Pretty much all the characters I want are available this way, so it's the best answer so far!

Not ideal, though — two keys, a tap, and a tap-hold-drag is still a lot slower than on most other keyboards.  (E.g. Alt+] on macOS, or Ctrl+1+4+5 on the Psion).  And there's still no way to pop up a list of all the available characters (like the ‘Show Emoji & Symbols’ menubar widget on macOS, or Shift+Ctrl+C on the Psion).
« Last Edit: June 27, 2018, 05:11:52 am by gidds »
   Andy/
Psion 3a → Psion 5 → Psion 5mx → Gemini → Astro