Platforms to show: All Mac Windows Linux Cross-Platform

Back to PresskeyMBS class.

PresskeyMBS.Charcode as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Remote Control MBS ComputerControl Plugin ✅ Yes ✅ Yes ❌ No ❌ No Desktop, Console & Web
The character you want to press.
Example
dim p as PresskeyMBS

p=new PresskeyMBS
p.charcode=8
p.keycode=&h33
p.press // press backspace on Mac OS

On Mac OS Classic the final printed charcode inside an editfield is the one you pass.
(Read and Write property)

Some examples using this property:

PresskeyMBS.Command as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Remote Control MBS ComputerControl Plugin ✅ Yes ✅ Yes ❌ No ❌ No Desktop, Console & Web
Tells the Press method to press down command key before and release it after it simulates the key press.
Example
dim p as new PresskeyMBS
p.command=True

It looks like the command key is not working for Mac OS Classic.
On Windows the control key is pressed if control or command properties are true.
(Read and Write property)

PresskeyMBS.Control as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Remote Control MBS ComputerControl Plugin ✅ Yes ✅ Yes ❌ No ❌ No Desktop, Console & Web
Tells the Press method to press down control key before and release it after it simulates the key press.
Example
dim p as new PresskeyMBS
p.Control=True

On Windows the control key is pressed if control or command properties are true.
(Read and Write property)

PresskeyMBS.Keycode as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Remote Control MBS ComputerControl Plugin ✅ Yes ✅ Yes ❌ No ❌ No Desktop, Console & Web
For Mac OS the number of the key on the keyboard which is pressed.
Example
dim p as PresskeyMBS
p=new PresskeyMBS
p.keycode=2
p.charcode=asc("d")
p.press 'shows a "d" on Mac OS

You find this codes in that nice tables for the codes of the Spritesurface in the Xojo books.
(Read and Write property)

PresskeyMBS.Lasterror as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Remote Control MBS ComputerControl Plugin 3.3 ✅ Yes ✅ Yes ❌ No ❌ No Desktop, Console & Web
The last error code.

Not all functions of this class fill this property!
(Read and Write property)

PresskeyMBS.Option as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Remote Control MBS ComputerControl Plugin ✅ Yes ✅ Yes ❌ No ❌ No Desktop, Console & Web
Tells the Press method to press down option key before and release it after it simulates the key press.
Example
dim p as PresskeyMBS
p.option=True

(Read and Write property)

PresskeyMBS.Shift as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Remote Control MBS ComputerControl Plugin ✅ Yes ✅ Yes ❌ No ❌ No Desktop, Console & Web
Tells the Press method to press down shift before and release it after it simulates the key press.
Example
dim p as PresskeyMBS

p=new PresskeyMBS
p.shift=true
p.charcode=asc("1")
p.keycode=18
p.press 'press !

(Read and Write property)

PresskeyMBS.VirtualCode as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Remote Control MBS ComputerControl Plugin ✅ Yes ✅ Yes ❌ No ❌ No Desktop, Console & Web
The virtual keycode to press.
Example
dim p as PresskeyMBS
p=new PresskeyMBS
p.charcode=asc("m")
p.virtualcode=-1
p.press ' makes a "m" on Windows.

If you don't know this code, just pass -1 and this value will be filled automatically using the charcode property.
After you call press or pressraw you'll find the matching virtualcode in this property.
(Read and Write property)

Some examples using this property:

The items on this page are in the following plugins: MBS ComputerControl Plugin.


The biggest plugin in space...