Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
11.3
11.4
Statistic
FMM
Blog
Presses a key.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
RemoteControl | 2.8 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |
Parameter | Description | Example | Flags |
---|---|---|---|
VirtualKey | The platform dependent virtual key code. Pass a number for a virtual key code or pass a string to let the plugin try to lookup the virtual key code. | "a" | |
ScanCode | The platform dependent scan code. Pass a number for a scan code or pass a string to let the plugin try to lookup the virtual key code. If this parameter is missing, the virtual key code is used to lookup the scan code. | "a" | |
down | Whether to press key down or release it. If parameter is missing the plugin will do both. | Optional |
Returns OK on success.
Key | Hex KeyCode | Decimal KeyCode |
a | 00 | 0 |
b | 0B | 11 |
c | 08 | 8 |
d | 02 | 2 |
e | 0E | 14 |
f | 03 | 3 |
g | 05 | 5 |
h | 04 | 4 |
i | 22 | 34 |
j | 26 | 38 |
k | 28 | 40 |
l | 25 | 37 |
m | 2E | 46 |
n | 2D | 45 |
o | 1F | 31 |
p | 23 | 35 |
q | 0C | 12 |
r | 0F | 15 |
s | 01 | 1 |
t | 11 | 17 |
u | 20 | 32 |
v | 09 | 9 |
w | 0D | 13 |
x | 07 | 7 |
y | 10 | 16 |
z | 06 | 6 |
0 | 52 | 82 |
1 | 53 | 83 |
2 | 54 | 84 |
3 | 55 | 85 |
4 | 56 | 86 |
5 | 57 | 87 |
6 | 58 | 88 |
7 | 59 | 89 |
8 | 5B | 91 |
9 | 5C | 92 |
F1 | 7A | 122 |
F2 | 78 | 120 |
F3 | 63 | 99 |
F4 | 76 | 118 |
F5 | 60 | 96 |
F6 | 61 | 97 |
F7 | 62 | 98 |
F8 | 64 | 100 |
F9 | 65 | 101 |
F10 | 6D | 109 |
F11 | 67 | 103 |
F12 | 6F | 111 |
F13 | 69 | 105 |
F14 | 6B | 107 |
F15 | 71 | 113 |
Space | 31 | 49 |
Tab | 30 | 48 |
Home | 73 | 115 |
Backspace | 33 | 51 |
End | 77 | 119 |
Page Up | 74 | 116 |
Page Down | 79 | 121 |
Delete | 75 | 117 |
Help | 72 | 114 |
Left | 7B | 123 |
Right | 7C | 124 |
Up | 7E | 126 |
Down | 7D | 125 |
= | 18 | 24 |
- | 1B | 27 |
[ | 21 | 33 |
] | 1E | 30 |
\ | 2A | 42 |
´ | 32 | 50 |
' | 27 | 39 |
; | 29 | 41 |
/ | 2C | 44 |
, | 2B | 43 |
. | 2F | 47 |
, | 2B | 43 |
Press a key
MBS( "RemoteControl.PressKey"; "a")
Press return key on Mac:
MBS( "RemoteControl.PressKey"; 36; 13)
Press cursor right key on Mac:
MBS( "RemoteControl.PressKey"; 124; 0 )
Write Hello
Set Variable [ $r ; Value: MBS("RemoteControl.PressShiftKey"; 1) ]
Set Variable [ $r ; Value: MBS("RemoteControl.PressKey"; "H") ]
Set Variable [ $r ; Value: MBS("RemoteControl.PressShiftKey"; 0) ]
Set Variable [ $r ; Value: MBS("RemoteControl.PressKey"; "e") ]
Set Variable [ $r ; Value: MBS("RemoteControl.PressKey"; "l") ]
Set Variable [ $r ; Value: MBS("RemoteControl.PressKey"; "l") ]
Set Variable [ $r ; Value: MBS("RemoteControl.PressKey"; "o") ]
Press return with plugin looking up codes:
Set Variable [ $r ; Value: MBS("RemoteControl.PressKey"; ¶) ]
Press space key:
Set Variable [ $r ; Value: MBS("RemoteControl.PressKey"; " ") ]
Created 18th August 2014, last changed 1st January 2019
RemoteControl.PressDialogButton.Clear - RemoteControl.PressKeyLater
Feedback: Report problem or ask question.