Page 1 of 2

Keyboard access to as many as possible characters

Posted: Wed Sep 19, 2018 6:49 pm
by Roberto

For designing a font simulating the display font of a programmable scientific calculator I intend to focus on two features: 1) pc font looking the same as on calculator display, 2) Optimum use of keyboard regarding quick access to as many as possible characters.

The font contains many more characters than those accessible through the keyboard. E.g. the button "G" I can use for lower and upper case "g" using the Shift button while the "7" button I can use for number "7" as well as for logical operator "And" also using the shift button.

Running out of keyboard entries I wondered if there are more keyboard options available to access other characters. Can other shortcut keys next to the shift button be used for offsetting the character number in the font? For example Ctrl "S" for character "Sin"?

I don't think the use of ligatures is an option since the result (support) depends on the text editor being used.

Point is avoiding as much as possible "Alt 0xxx" for typing otherwise inaccessible characters (numbers hard to remember) and taking full advantage of instant keyboard input.

Background info: I have two identical calculators. Written programs can be stored in memory (and are lost if BOTH batteries run empty). There is no way to import programs from e.g. PC other than between calculators (each with limited memory anyway). Having two calculators is a semi-insurance for not losing written programs but for backup insurance, I like to archive my programs on pc using a dedicated font since there are many characters involved not present in other available fonts.

Any ideas or suggestions?


Re: Keyboard access to as many as possible characters

Posted: Wed Sep 19, 2018 8:21 pm
by Erwin Denissen
If the font is solely (or mainly) for your own use, then you can continue to "abuse" character with glyphs that are not representative for those characters.

Microsoft keyboard layout creator might help you access more characters in a friendly manner. Alternatively you can use MainType as it contains an insert character feature.

Re: Keyboard access to as many as possible characters

Posted: Wed Sep 19, 2018 8:33 pm
by Leon Gauthier
Unless you are into it for the fun of it, why re-invent the wheel?
There are some free calculator key fonts on the web.
One example: ... 557992/83p
There are also fonts which emulate various calculator displays as well.

Re: Keyboard access to as many as possible characters

Posted: Thu Sep 20, 2018 5:59 pm
by Roberto

No, I intended to create the font for it being useful for myself as well as to others. Therefore workarounds are no option.

Fun, fun...usually useful doesn't go along with fun really :-P

Re-inventing the wheel actually isn't applicable anymore; I created the two fonts (for Casio fx-4500PA and Casio fx-5800P) back in 2014 already :-)
I don't remember if I looked for already available related fonts first. Just did but couldn't find any satisfactory ones (missing lots of glyphs; my fonts contain all related glyphs counting between 400 and 450 or so).
It's just once somehow I messed up the font mapping so I need to get that fixed in order to end up with usable export. Such inconvenience can happen when doing a real/first project in totally unfamiliar (type of) software :roll:
Anyway, before picking it up again I thought maybe I could prepare some extra work to improve keyboard access if I could add e.g. Ctrl-[key] like Shift-[key].

Seems the only option would be use of ligatures instead but with the intention to share the fonts it is likely not worth the efforts with the result depending on used text editor.

So I guess my main focus will be correcting glyph mapping and keyboard access featuring only additional use of the Shift button. Complementary keyboard layout drawings (and character code lists) should cover for the (logical chosen) abuse of some characters (and harder to access glyphs).

Looking forward to the fonts to get working though: In the past I archived my programs using mutliple exotic fonts that contained relatively acceptable special characters. Over the years switching text editors and pc's it was always a pain in the arse the files being messed up when trying to re-open: either not compatible (open/import) or missing fonts being replaced by fonts that contain totally different characters. Not many (older) text editors inform the user which actual fonts are missing (and I never wrote down the name of used fonts in my oldest archived calculator programs). A single dedicated font per calculator would be an ideal solution.

First things first: figuring out proper font mapping :?


Re: Keyboard access to as many as possible characters

Posted: Fri Sep 21, 2018 8:24 am
by Leon Gauthier
As Erwin has suggested, Microsoft keyboard layout creator offers the ability to create a keyboard such as "English (United States) United States-International Keyboard" where a large collection of accented Latin characters have been mapped to standard keyboards and seems to have a large number of open key combinations all of which could be relatively easy to re-assign to other custom glyphs you create.
See: ... x?id=22339

It seems to be a rather old , clunky (in my view) way to map hundreds of various languages by creating language specific keyboard layouts which might have been created by Microsoft for very early versions of Windows. However, the link provided above seems to only support English and yet one can load all of the keyboard layouts already on the machine which could be used as a starting point for your own layout. I have not counted the possibilities but I'll bet that there is room for all of the custom key images you might have in mind with its Shift, Alt and Ctrl keys in combination with the normal keys.

Couldn't you create composite glyphs with multiple characters like Sin, Cos, Enter, Sum or whatever within boxes to simulate the calculator keys and simply assign them to PUA code points? Of course, this would restrict your font to applications which support unicode.

This should be a viable way to document your calculator programs in document form which is what I think you are after.

Re: Keyboard access to as many as possible characters

Posted: Fri Sep 21, 2018 6:42 pm
by Roberto
Hi Leon,

Thank you so much for your thorough and compassionate replies!

I just checked out the link you gave and also did an internet search for keyboard layout mapping software. Basically an interesting tool for specific situations but I don't think constantly switching keyboard works out well for writing programs in a text editor. I plan to share the fonts so more requirements to use the fonts other than installing them would be a bit over the top.

Unfortunately I am still very unfamiliar with most technical background regarding font development. This includes font mapping in the dedicated regions like the private range or symbol range and how text editors deal with those. No idea how to access glyphs in those areas when having installed a font and running it in a text editor. I remember I once put all glyphs in the private area and when running the font in PagePlus it was useless. Therefore later I mapped all glyphs in the 'keyboard area" and beyond; the latter was accessible with Alt 0xxx.

Couldn't you create composite glyphs with multiple characters...: you mean typing them with individual characters? Yes, many glyphs can be typed directly (and more with abused keyboard characters) but still there are many glyphs left that are impossible to compose with the glyphs that can be entered directly from the keyboard (latin characters, statistical characters, integral characters, etc).
Compromise: carefully choose which (most used) symbols to be accessible through the keyboard and make sure the abused characters are logically/recognisable chosen and/or related ones in the same area of the keyboard: put all efforts for the user to better remember or guess where they are.

I wanted to show a screendump of the glyphs but unfortunately I can not find a way to increase the size of the glyph boxes in Font Creator: many of the multi-character/symbol glyps don't fit in the boxes so are cropped at the box borders. The screendump would clearly show there's a lot that can not be composed of typing individual characters/symbols.

"...simply asign them to PUA code points..." Uhm, simple for you perhaps but I really miss even the basics of font design :D
Could you perhaps explain a bit how to access PUA code points? That range is beyond Alt 0xxx keyboard entry. It's a pitty I couldn't find an "introduction to font design" in the FontCreator manual explaining the technical basics/background to get an overview how text editors deal with fonts and how the dedicated mapping ranges are used/dealed with.


Re: Keyboard access to as many as possible characters

Posted: Fri Sep 21, 2018 7:12 pm
by Bhikkhu Pesala
  1. Switching keyboards is probably the only way to access more characters than there are keys on a keyboard.
  2. Private Use Area characters can only be inserted via some sort of Character Map. PagePlus has its own Insert Symbol dialogue, as does LibreOffice or Word, but other programs would rely on Windows Character Map, Babel Map or some other Copy and Paste workaround.
  3. Alt+nnn only works for a ASCII or ANSI characters sets in text editors. That is too limited, hard to remember, and cumbersome to use.
  4. Customised Windows keyboards like my PagePlus keyboard, or the US International keyboard, will give access to a number of accented characters in normal fonts with the help of dead keys. So, the ` dead key can be used to type àèìòù and Shift `can be used to type áéíóú. On my keyboard the a key combined with dead keys can type àáäãâă and ÀÁÄÃÂĂ so six times as many characters as the a key alone.
  5. A font like yours that contains lots of symbols that have no Unicode assigned code-points can use the Latin-1 Supplement, Latin Extended-A, and Latin Extended-B (or even Latin Extended Additional, etc.) character sets.
  6. Mapping the symbols to these codepoints makes them easier to type, but as you noted, it is a nightmare deciding on a suitable and consistent mapping. That's why the Unicode system exists, so that the Integral sign, for example, has its own mapping code-point. However, text editors cannot access these code-points without a character map.
  7. To zoom the characters inside the glyph overview cells, hold down Ctrl+Shift and scroll the mousewheel or press the ± keys on the Numpad.

Re: Keyboard access to as many as possible characters

Posted: Sat Sep 22, 2018 11:23 pm
by Roberto
Hi Bhikkhu,

Thanks for the clear info!

3: bummer!

4: From what I understood about 'ligatures' that's exactly the 'dead character' thing you are referring to. As far as I understood from that feature ligatures are individual glyphs super-imposed on the run (while typing) forming composite characters. They only can be put anywhere in the vertical area in, above or below the actual glyph. Basically, the use of ligatures would be a powerful way to increase keyboard access a great deal. Unfortunately, the 'constant glyph width' requirement makes it useless for my goal.

5/6: Latin Supplemented/Extended/etc. already cannot be typed directly from the keyboard, right? The easiest way is to use the Basic Latin area (keyboard access) and the area beyond, I would guess: to avoid one constantly having to scroll down a lot in a character map to enter the (e.g.) Latin Extended area. Or could that be fixed by removing/deleting all empty codepoints in FontCreator before compiling the font? I remember once I messed up a big deal with deleting blocks of code points when trying to use the symbol or private use areas: for PagePlus, the font seemed totally blank. That why an introduction would be useful explaining code point areas, how the keyboard deales with sending characters and how text editor interpret fonts featuring extra-ordinary code point areas or even only containing 'non-keyboard' ranges (= other than Basic Latin area?).

7: Works like a charm! Only pitty the boxes remain square forcing to compromise between small zoom and glyph width crop. Anyway, with your tip I was able to create an acceptable screenshot of my current characters:
Casio_fx-5800P.png (52.88 KiB) Viewed 3433 times
As you can see in the overview it is impossible to create all glyphs by typing individual characters: the number of keyboard character simply doesn't suffice.


Re: Keyboard access to as many as possible characters

Posted: Sun Sep 23, 2018 3:33 am
by Leon Gauthier
Just to illustrate mapping a calculator font to a US keyboard shown in kbd01.
kbd01.png (11.17 KiB) Viewed 3441 times
I created six keys (Sin, Cos, Tan, Sin-1, Cos-1, Tan-1) and mapped them such that the right Alt key gives you the three shown in kbd02
kbd02.png (7.79 KiB) Viewed 3441 times
Using shift with the right Alt key gives you the inverse functions shown in kbd03.
kbd03.png (6.29 KiB) Viewed 3441 times
I randomly mapped the symbols summation, root and Pi to the keyboard accessed with the Ctrl key as shown in kbd04.
kbd04.png (8.2 KiB) Viewed 3441 times
The actual characters as printed are shown in kbd05
kbd05.png (3.13 KiB) Viewed 3441 times
As you can see, there are ample slots available for whatever characters you might wish to map.

That was fun and I learned a bit about creating composites.

PS The trigonomic keys above were created in the PUA and are readily accessable via a custom keyboard I have illustrated above.
As for the total number of characters you need, I had not seen your last post when I posted this so, I'll have to take a look at your screen dump … a rough count of what would be available on a custom keyboard would be around 140 if you left the original QWERTY keys as they are which I would assume that you want to do in order to document your code.

You are right, there are not enough slots to enable you to map all of those symbols to a US keyboard.

Re: Keyboard access to as many as possible characters

Posted: Sun Sep 23, 2018 6:33 am
by Bhikkhu Pesala
Ligatures are not the same as dead keys. If you type f f i then a font with OpenType ligatures will perform a glyph substitution and replace those three glyphs with a single ffi glyph. The text string remains as "f f i" when copied to the clipboard, and the word "difficult" is not highlighted as a spelling error. If the application does not support OpenType ligatures then no glyph substitution is made.

Dead keys followed by a space will insert the accent alone, e.g. ` or ~ but if another letter is typed afterwards the accented character is inserted, e.g. à or ã or ñ. Bañanà would be highlighted as a spelling error as that is the actual text string that has been inserted in the document.

If your font only contains the desired characters (and no empty glyphs) you won't have to do much scrolling down when using the Insert Symbol dialogue in PagePlus or LibreOffice.

The number of characters in your font is not excessive. With just the five vowels combined with five dead keys you have 25 extra glyphs that can be typed; with dead key followed by Shift+Vowel, there are 50. Dead keys can also be used followed by a consonant.

I can type all of these composite characters with dead keys + consonant:

çḑģḩķļņŗşṭ ḍḥḷṃṇṛṣ ñ ǹ ń ḡ ĝ ğ and uppercase, and some more.

More Shortcuts

Making the keyboard is time-consuming, so you could just install mine, and design your font around that, e.g. ç could be COS, ş could be SIN, ţ could be TAN, etc.
PagePlus Keyboard.png
PagePlus Keyboard.png (82.44 KiB) Viewed 3424 times

Re: Keyboard access to as many as possible characters

Posted: Sun Sep 23, 2018 9:25 am
by Roberto
Certainly interesting matter here! Both ligatures behavior as well as those custom keyboards.

How does it work in practice using the custom keyboards? Say I am in PagePlus writing (calculator font active) and while typing temporary need to 'switch keyboard'? Is the keyboard program to run which I bring to the foreground, there somewhere activate another keyboard and return to PagePlus?

That ligatures approach indeed brings up the option to create an intuitive to use extensive font glyphs access with the key combo's automatically selecting the dedicated Unicode. Heck, it can even save a lot of typing! Always thought e.g. f f i converting to fii was a sole text editor feature (choosing its own font (installed with the editor) containing the symbols) and not behavior build in the font. Thinking about it makes sense though: this way the font style remains exactly the same. With those key combo's I can replace whole rows of symbols like l c [character] for Latin capitals, l l [character] for Latin lower case letters and even can drastically reduce file size at the same time (not an issue but still very nice): G o t o is being replaced by single character Goto or normally typable "LpWhile " could become a single character with just typing the two or three first letters.
I'm getting excited: looks like use of ligatures is the exact answer to my problem: no constant keyboard switching needed, all glyphs accessible from keyboard, saves typing, reduces file size and usable for the public: assuming users intending to archive written programs for scientific calculators are owners of one of the decent text editors thus likely to support ligatures.

This leaves me diving into the ligatures section of the FontCreator manual before actually picking up restoring my messed up fonts. Also, I intend to flag them as 'symbol fonts' to avoid the text editor bothering the user with loads of red underscores caused by the spell checker. How does creating a symbol font work? Do I enter all keyboard characters (including dead key abuse) in the normal Basic Latin area and put the leftover in the Symbols area, finishing up with ligatures assignment? (Assuming the latter is a table: key combo -> Unicode).


Re: Keyboard access to as many as possible characters

Posted: Sun Sep 23, 2018 9:37 am
by Roberto
Oh, wait: switching keyboards is not required when using the custom keyboard software: one is just constantly using s single keyboard with increased functionality due to use of the special keys.

It looks like there are two uses for custom keyboards:
Custom keyboard 1: normal + larger unicode access for the standard fonts (usually having same characters at identical unicode points)
Custom keyboard 2 and up: layout dedicated to the use of a special font; both basically work together for special purposes.


Re: Keyboard access to as many as possible characters

Posted: Sun Sep 23, 2018 9:57 am
by Bhikkhu Pesala
Don't create a Symbol font — it's too limiting. Choose language (none) in PagePlus to disable spell-check.

Windows Notepad supports Standard ligatures (liga) so as long as your font assigns SIN to a standard ligature, and as long as people are using Notepad, it will work until they want to type YOURS SINCERELY in all caps or unless they use another text editor like Notepad2.

Windows has a built-in system for switching keyboard drivers.
Regional Settings Language Bar Options.png
Regional Settings Language Bar Options.png (12.31 KiB) Viewed 3420 times
Ligatures substitute glyphs as you type:
Standard Ligatures.png
Standard Ligatures.png (2.29 KiB) Viewed 3418 times

Re: Keyboard access to as many as possible characters

Posted: Sun Sep 23, 2018 10:53 am
by Roberto
Hi Bhikkhu,

Ohw, that's tricky! I thought the character replacement would take place after typing a space.
Can one undo an automatically generated ligature by going back one character? Like automatic correction on a mobile phone/ tablet? I don't suspect it, though since the last character is already a single character "ff". Like 'e to create é is just deleted after a backspace.

Hmm, this one way behavior requires very careful selection of characters for triggering ligatures then. Using at least three characters would be safest.
On the other hand, if case sensitive then e.g. lower case - upper case - lower case would work like sIn, tAn, gOt for Goto, etc. might work since normal texts only have multiple upper cases one after the other or upper case followed by lower case characters.

Still tending to go the ligatures approach: more liable for creating intuitive, better to remember key combinations. Even though the custom keyboard examples shown by Leon and you look very interesting. Most useful when often used because the key combo's are non-selfexplanatory. When creating keyboard shortcuts I only go two-button ones and NEVER three button ones; way too hard to enter as being a one/two-finger typer :-)
Still have to experiment with the ligatures thing and see if I can come up with a good list of descriptive three-character ligature triggers.

PS: why do you have a custom keyboard particularly for PagePlus? Isn't it just a custom keyboard usable in any other advanced text editor?


Re: Keyboard access to as many as possible characters

Posted: Sun Sep 23, 2018 11:46 am
by Bhikkhu Pesala
Roberto wrote: Sun Sep 23, 2018 10:53 amOhw, that's tricky! I thought the character replacement would take place after typing a space.
It's not like Autocorrect. The text string is unchanged. The font controls the onscreen rendering, and what is printed. If you change the font to one without ligatures you will get the original text ffi instead of a ligature glyph. Accented é is one glyph; unlike e + combining acute accent though they may seem to be identical on screen.
Roberto wrote: Sun Sep 23, 2018 10:53 amPS: why do you have a custom keyboard particularly for PagePlus? Isn't it just a custom keyboard usable in any other advanced text editor?
It's a Windows keyboard that works in all applications īṇçḷūḍíṅḡ my browser, but I use PagePlus for all of my word-processing tasks so I named it as the PagePlus keyboard.