#This AutoKey script will open a window with a menu from which you can pick a fraction character to be inserted at your cursor's position.
import unicodedata
vf="VULGAR FRACTION "
onehalf=unicodedata.lookup(vf + "ONE HALF") #THIS DISPLAYS AS EXPECTED
onethird=unicodedata.lookup(vf + "ONE THIRD")
twothirds=unicodedata.lookup(vf + "TWO THIRDS")
onequarter=unicodedata.lookup(vf + "ONE QUARTER") #THIS DISPLAYS AS EXPECTED
threequarters=unicodedata.lookup(vf + "THREE QUARTERS") #THIS DISPLAYS AS EXPECTED
onefifth=unicodedata.lookup(vf + "ONE FIFTH")
twofifths=unicodedata.lookup(vf + "TWO FIFTHS")
threefifths=unicodedata.lookup(vf + "THREE FIFTHS")
fourfifths=unicodedata.lookup(vf + "FOUR FIFTHS")
onesixth=unicodedata.lookup(vf + "ONE SIXTH")
fivesixths=unicodedata.lookup(vf + "FIVE SIXTHS")
oneeighth=unicodedata.lookup(vf + "ONE EIGHTH")
threeeighths=unicodedata.lookup(vf + "THREE EIGHTHS")
fiveeighths=unicodedata.lookup(vf + "FIVE EIGHTHS")
seveneighths=unicodedata.lookup(vf + "SEVEN EIGHTHS")
choices = [
onehalf,
onethird,
twothirds,
onequarter,
threequarters,
onefifth,
twofifths,
threefifths,
fourfifths,
onesixth,
fivesixths,
oneeighth,
threeeighths,
fiveeighths,
seveneighths
]
retCode, choice = dialog.list_menu(choices)
if retCode == 0:
keyboard.send_keys(choice)
I don't know about everyone else, but I like to collect recipes and add them to my personal wiki. When it comes to measurements that use fractions, I prefer the look of vulgar (single-character) fractions rather than triple-character fractions.
--
You received this message because you are subscribed to the Google Groups "autokey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to autokey-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/autokey-users/6944e15d-4191-451a-ad61-afc9f17a17bf%40googlegroups.com.
Maybe I'm I just completely misunderstand the whole thing, but I use those characters all the time, no AutoKey needed. I just customised my keyboard layout, like this:
Shift+1: ⅛
Hey there,
Johnny Rosenberg wrote:
>Maybe I'm I just completely misunderstand the whole thing, but I use
>those characters all the time, no AutoKey needed. I just customised
>my keyboard layout, like this:
>Shift+1: ⅛
>Shift+2: ¼
>Shift+3: ⅜
>Shift+4: ½
>Shift+5: ⅝
>Shift+6: ¾
>Shift+7: ⅞
>Shift+8: ⅓
>Shift+9: ⅔
>Shift++: ⅙
>Shift+-: ⅚
>So I can just use the Shift key and my numeric part of the keyboard
>to get all of those. Should be a lot quicker than working with a
>menu.
It's a bit more complicated in GNU/Linux.
We need to press a few
more buttons than you:
<ctrl>+<shift>+u+00bd+<space> = 1/2
<ctrl>+<shift>+u+2153+<space> = 1/3
...and so on.
Note that the space is for when you want to insert the character
inline and is stripped out automatically as part of the process of
creating the character. You could replace that with the press of the
Enter key If you wanted to insert the character and drop down a line.
What's important, though, is that you must use something after the
code portion of that key combination or nothing will happen.
>You can also use your Compose key, for instance:
>Compose 12 ⇨ ½
>Compose 56 ⇨ ⅚
>I assigned my Compose key to Caps Lock, which also took care of the
>old problem that hitting it accidentally when intending to hit ”a”
>is very annoying. No problem with that any more.
>This method is probably the way to go, since you don't need to
>fiddle with your keyboard layout, if you think that's complicated.
That's definitely an option, but involves setting something
additional up, so I'd rather avoid it, if possible and find a way to
do it with the operating system set up as is, and it's looking like it
will be possible. I'm making headway (see my next message).
>Anyway, AutoKey is really not needed for this.
>Unless I totally misunderstood what you are trying to do.
You're right that it's not needed for this. All of the fractions can
be inserted with the correct key combinations. This is fine if you
can (or are willing to) memorize all of the key combinations or keep
a reference handy and use it when you need to insert one.
AutoKey is a luxury that makes it so you only need to memorize one
abbreviation and then click a radio button to pick the fraction you'd
like from the menu. If you forgot the abbreviation for your fractions,
it takes but a moment to launch AutoKey, open the main window, and
check it. If you then decide that you no longer like that
abbreviation, it takes another moment to get rid of it and type a new
one in.
Neither method is the correct or best way to insert Unicode
characters. It's just a matter of how a person likes their work-flow
to occur or just plain how they like to do things.
I've never been big on memorizing tons of key combinations,
so I love
the elegance and simplicity of programs like AutoKey that do the
memorizing for me. My iPad has its own built-in one and I bought one
for my Windows work machine (and I have to admit that I wouldn't
bat an eyelash at paying ten times what I paid for it if I had to).
At this point, I wouldn't want to be without any of them. They're
just so darned handy whenever you have things you need to repeat
and/or don't want to memorize.
--
Little Girl
There is no spoon.
--
You received this message because you are subscribed to the Google Groups "autokey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to autokey-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/autokey-users/5e2c8541.1c69fb81.63194.964a%40mx.google.com.
Holey moley!
The only reason 0.90.4 still exists is because we can't delete it. It's
at least seven years old, unmaintained, and unsupported. There is no
package maintainer for AutoKey on the Debian team, so their version is
stuck at that release and that's where almost all distributions based on
Debian (Ubuntu ...) get it.
Friends don't let friends use 0.90.4! :)
We also had a PPA where you could get a somewhat newer version, but the
owner isn't contributing any more so we can't update that either.
However, all new releases are available as deb packages on GitHub, so
they're very easy to install. We're on 0.95.9 now.
github.com/autokey/autokey/releases/
--
You received this message because you are subscribed to the Google Groups "autokey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to autokey-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/autokey-users/9edcdc72-af3a-0500-65e6-d86985c789c5%40main.nc.us.