Page 1 of 1

Assigning key strokes

Posted: Tue Dec 01, 2015 5:22 pm
by pwoolson
Hello,
I'm using FontCreator to create a very specific font to be used in engineering software. Is there a way to assign a specific keystroke to a glyph? (like ctrl+a to get a superscript a)
I assume the code point is how the font is reading the key commands. Is there some sort of map that translates the code point ($B8) to keystrokes?
thanks!

Re: Assigning key strokes

Posted: Tue Dec 01, 2015 10:32 pm
by Bhikkhu Pesala
Code-point $B8 is a cedilla, not a superscripted a. Unless your engineering software supports OpenType features (unlikely) you may be reduced to using Uppercase for regular text and lowercase for supercripts for convenient text input.

Re: Assigning key strokes

Posted: Wed Dec 02, 2015 4:21 pm
by Erwin Denissen
You could also consider making a specific keyboard layout. I guess that has some benefits, but it depends on your exact needs.

Re: Assigning key strokes

Posted: Mon Aug 15, 2016 8:02 pm
by Kenkasoftsm
Bhikkhu Pesala wrote:Code-point $B8 is a cedilla, not a superscripted a. Unless your engineering software supports OpenType features (unlikely) you may be reduced to using Uppercase for regular text and lowercase for supercripts for convenient text input.
There's a big possibility that it will affect uppercase and lowercase for superscripts. But, gotta atleast try.

Re: Assigning key strokes

Posted: Fri May 05, 2017 9:46 am
by tjdickinson
Indeed, I recommend using Microsoft Keyboard Layout Creator, which is a free software and very easy to use. I've used it before to make my own custom keyboard (which I'm using right now, in fact, and I use it all the time as my default keyboard), and it allows me to easily type diacritic marks using deadkeys (àéïôū etc. are a breeze) and other special characters like æ œ ł ij ȷ ® š ð ſ ŋ þ ž × ç ß etc. which are otherwise more difficult to input.

Just last night, I made a font (based on another opensource font) for the International Phonetic Alphabet using FontCreator, and I created a keyboard to go with it. Now, when I switch to that keyboard:

i kan taip ˈjuziŋ foʊˈnɛtik noˈtæʃǝn

It takes a little practice to reprogram your muscle memory to your new layout, but I find it's well worth it.

Method: when you've made your font, print out a glyph sheet containing all the codepoints for each glyph. In MKLC, start from an existing keyboard (easiest), or start from a blank keyboard, and input each glyph using the keyboard or codepoint. NOTE: you can just type <a> (without brackets) to code that letter for a key, and so forth with any other glyph accessible using the installed keyboard. You can also copy and paste glyphs from MainType or the character map. Finally, (what I find easiest for the glyphs not accessible on my keyboard) you can just simply type in the unicode codepoint, BUT you have to ALWAYS use u+ before each code sequence. So, for a superscript n, you have to type u+027f. If you just type 027f or $027f, it will take that as character input rather than code. (But, as a handy side note, you can use this to make a keystroke input multiple characters, even whole words! Sick of typing "etc."? Just program a keystroke, like AltGr+e, to automatically type that string for you! Even better, they still input as distinct characters, rather than a composite glyph.)

Just make sure to warn other people who use your computer, or they'll suddenly be surprised to find the keyboard doesn't work as they expect!