-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathkeyboard.chars.fmfn
61 lines (58 loc) · 1.82 KB
/
keyboard.chars.fmfn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* =====================================================
* keyboard.chars( character )
*
* RETURNS: (string) unicode characters of keyboard symbols
* PARAMETERS: @char = (string) name of the character (matches the variable name)
* DEPENDENCIES: none
* NOTES:
* =====================================================
*
*/
Let ( [
wineval = "Let ( [¶
alt = TextStyleAdd ( \"alt\" ; Superscript );¶
control= TextFont ( \"ˆ\" ; \"Arial\" );¶
deleteback = TextFont ( \"Õ\" ; \"Wingdings\" );¶
deleteforward = TextFont (\"Ö\" ; \"Wingdings\" );¶
escape = TextStyleAdd ( \"esc\" ; Superscript );¶
return = TextFont (\"¿\" ; \"Symbol\" );¶
shift = TextFont ( \"ñ\" ; \"Wingdings\" )¶
];¶"
& character &
")";
maceval = "Let ( [¶
alt = \"⌥\";¶
applesymbol = \"\";¶
capslock = \"⇪\";¶
clear = \"⌧\";¶
command = \"⌘\";¶
control = \"⌃\";¶
deleteback = \"⌫\";¶
deleteforward = \"⌦\";¶
downarrow = \"⇣\"; // alternates ↓¶
eject = \"⏏\";¶
end = \"↘\"; // alternates ⇲¶
enter = \"⌤\";¶
escape = \"⎋\";¶
home = \"↖\";
// alternates ⇱ ↸¶
leftarrow = \"⇠\"; // alternates ←¶
numberlock = \"⇭\";¶
pagedown = \"⇟\";¶
pageup = \"⇞\";¶
power = \"⌽\";¶
return = \"⏎\"; // alternates ↩¶
rightarrow = \"⇢\"; // alternates →¶
shift = \"⇧\";¶
space = \"␣\";¶
tabback = \"⇤\";¶
tabforward = \"⇥\";¶
uparrow = \"⇡\" // alternates ↑¶
];¶"
& character &
")";
isWindows = Case( Get( SystemPlatform ) = -2; True ; False );
result = Case ( isWindows ; Evaluate ( wineval ) ; TextFont ( Evaluate ( maceval ) ; "Apple Symbols" ) )
];
If ( result ≠ "?" ; result ; "No match")
)