Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Right now we are focused on Windows AAC Software. For iOS or Android, a developer needs to support relaykeys for it to work.
Most AAC software has a way of connecting to an external application. Some call this "Run Programme or something similar. As long as RelayKeys is installed and the correct hardware is connected you can then call the installed command line application - with the correct syntax.
Take a look at the guides for your software.
The key application you want to access is the relaykeys-cli-win.exe
found in C:\Program Files (x86)\Ace Centre\RelayKeys
\
For a full list of commands you can send see here.
If you pass the --notify flag to the cli application you will get notifications about the devices you are connected to and the status of the device. See here for more information
There is no documented way for third parties integrating their software into commercial AAC software for example integrated notifications. So we have to make use of the operating system notification system. The difficulty on Windows is that by default full screen apps do not see notifications. So to make this work we recommend three alterations to your notifications.
Turn Focus Assist off.
Turn off the setting "When I'm using an app in full screen mode"
And next - because AAC users wont typically be able to dismiss notifications change the time that they appear for. To do this follow the steps here.
Communicator 5 is a AAC software for Tobii Dynavox communication aids . Follow the steps below to add commands to your pageset
Pageset quick start. Want a headstart? Download the Pageset here. It has all the commands you should need. Just import, add the pageset to your Home Page and adapt
This is the best way to enter longer texts and allows you to use the communication aid's prediction and phrase banks etc. Use the "Copy" command followed the Run Program command to run relaykeys-cli-win.exe with the paste argument
This is useful for making a keyboard-like page with individual letters and other keys that send one keystroke at a time. Use the Run Program command to run relaykeys-cli-win.exe with the keypress:LETTER argument (where letter is the key you want to send)
For special commands and shortcuts such as control-C, alt-F4 etc use the Run Program command to run relaykeys-cli-win.exe with the keypress:KEYNAME,MODIFIER argument (where keyname is the key you want to send)
Use the Run Program command to run relaykeys-cli-win.exe with the mousemove:X,Y argument (where X,Y is the distance you want to move the mouse), or the mousebutton:BUTTON,ACTION argument (where BUTTON is the button to use, and ACTION is click or doubleclick etc.)
Use the Run Program command to run relaykeys-cli-win.exe with the ble-cmd:reconnect, ble-cmd:switch, or ble-cmd:devname --notify commands
Before you think about using RelayKeys for MindExpress have you tried using MacroSever? Its built into MindExpress. It works well - but does rely on a network/TCP connection to the secondary devices - which also need to run the software.
So if you want to communicate directly with the serial device - instead of via the server you can. So to do this, you would need to write your software to open the serial connection and use the correct commands to talk to the hardware.
Baud rate should be 115200
Hardware flow control CTS/RTS on
nrfVID = '239A'
nrfPID = '8029'
Then you send and receive commands over Serial. The following is a list of the commands and what you should expect to receive back
The good thing about RelayKeys is that we dont try and send actual characters - we send actual keys. This is good - as it means we dont deal with the multilingual problems and different keyboard maps. However - it does mean the the command to send and press a keyboard key can look a little daunting. Here is what it looks like.
AT+BLEKEYBOARDCODE=02-00-00-00-00-00-00-00
This is pretty standard stuff when it comes to a keyboard HID code. E.g. look at this to see what its all about. In short though:
The letter "a" is usage code 0x04 for example. If you want an uppercase "A", then you would also need to set the Byte 0 modifier bits to select "Left Shift" (or "Right Shift").
Hint: Look at this file for a way to format this nicely
AT+BLEHIDMOUSEMOVE=X,Y,WY,WX
X = Right Pixels
Y = Down pixels
WY = Scroll Down
WX = Scroll Right
MouseMoveX = Pixels RIGHT and MouseMoveY = Pixels DOWN. So to go RIGHT/UP = use negative numbers.
e.g. This moves it Right by 10 and Down by 10
AT+BLEHIDMOUSEMOVE=10,10,0,0
AT+BLEHIDMOUSEBUTTON=Button[,Action]
Button is one of
l = Left
r= Right
m=Middle
b=Mouse backward
f=Mouse forward
NB: Mouse backward and forward are not available functions on all Operating Systems
Action is
Click
Doubleclick
O (which acts as press/release toggle)
e.g.
Single click:
Double click:
Adds a new device to the cached list of devices. After giving this AT command the user should connect with the board via BLE. If connection is successful then the device's name will be added into the list and the board will connect with the device.
Note: A user can only add a new device if the cached list is not full. If the list is full then the board will return with an Error
. If no new device connects with the board till the timeout (set to 30 seconds), a Timeout Error
will be returned.
This AT command will remove said device's name from the cached list. Device's name should be written between double quotes. You have to be exact with this! If device_name
is not found in the list, then the board will return with an Error
.
If device_name
is currently connected to a BLE device, then the board will disconnect from this device and then remove device's name from the list.
This AT command will return the currently connected BLE device's name. If the board is not connected with any BLE device then it will return NONE
.
This AT command will switch the BLE connection to the next device in the cached list. The board will try to connect with the next listed device till the timeout, then Timeout Error
will be returned and the board will try to connect with the next device listed in the cache.. and so on..
This AT command will return a list of device names.
This AT command will change the maximum number of BLE devices possible in the cached list. The number should be greater than 0 and less then 15
Gets the current mode - either wired or wireless.
Switches the current mode from wired to wireless. Or Wireless to wired.
Note if the device IS NOT connected to RelayKeys wirelessly then it will stop responding. You will have to switch connection a different technique. See here for more details
Before you look at using RelayKeys with Snap have you considered AccessIT 3? Its available for TD software and is good! There are some snags - its not multi device compatible and does require the dongle being plugged in.
You need to edit your snap pageset - and create a "General" button - then you can add an action to a button. The action
If you don't want to use any specific AAC software, you can get going with our demonstration software "RelayKeys-QT" (aka RelayKeys or RelayKeys Desktop). You will find this on your desktop as well as your start programmes if you have installed our software. It has 4 main buttons on the left:
This screen enables you to capture the keystrokes and mouse movements and any captured input gets sent directly to the currently connected device. To connect a device - see "Devices" screen.
This screen enables you to create a macro file. This records your mouse or keystrokes and enables you to play it back. This is useful for creating long sequences of commands or say for writing a common piece of text such as a signature. You can play it back in this software or use the macro with the CLI tool.
This screen enables you to switch between paired devices and change the current mode. This means the RelayKeys hardware can run either as a wired dongle or a wireless device. Use the switch mode to change these modes.
This screen enables you to add and remove paired devices - as well as removing all devices from the relaykeys hardware.
The Grid 3 is a commonly used piece of software for AAC. Follow the steps below to add commands to your gridset
Gridset quick start Want a headstart? Download a Gridset here. It has all the commands you should need. (You'll need to download the raw file) Just copy/paste and adapt
Use the relaykeys-cli-win.exe with the keypress:LETTER argument (where letter is the key you want to send)
Use the "Copy" command followed by the relaykeys-cli-win.exe paste argument
You can use RelayKeys in a number of different ways depending on your needs
Using our desktop software
Using a Command Line Application (that Third-party software such as AAC software can use)
Directly communicate over serial in your software.
We have created a command line interface which allows you to send mouse and keyboard commands to your RelayKeys hardware.
To run it access
relaykeys-cli.exe command:data
or if running it in pure python
python relaykeys-cli.py command:data
and the non-verbose, non-windowed version
python relaykeys-cli-win.py command:data
Where 'command' and 'data' are provided below.
Remember to change your application accordingly We regularly use the term for command line application 'relaykeys-cli' in this documentation. Often though you will want to use the 'relaykeys-cli-win.exe' application that will run a little quicker and has no printed output. Use this for your default call to relaykeys from other applications. If you want to see any errors use 'relaykeys-cli.exe'
If you are developing with the code You must make sure the server is running when you call the cli files. The server (aka Daemon) is the code that turns these commands into the correct AT syntax and access the com port
Keymap files are located in cli_keymap folder. You can choose which keymap file the CLI is going to use in the cfg by assigning file name to keymap_file variable (see here)
By default the us_keymap.json is loaded. To run relaykeys-cli with other keymap either change the cfg setting or use the -c flag on the cli application. E.g.
relaykeys-cli.exe -c .\relaykeys-example.cfg type:@
See more info on the format here
This takes the pasteboard of the computer (i.e. when you copy some text) and pastes the resulting string to RelayKeys
i.e.
relaykeys-cli.exe paste
Types the string following the :. Note you will need to escape spaces etc
relaykeys-cli.exe type:Hello\ World
You can send special characters, ones that are usually shifted, by sending the key and the shift modifier (see keyevent below). But for the type and paste commands we have some other characters that are hardcoded and it will do the conversion on the fly.
So for example, to send the @ symbol:
relaykeys-cli.exe type:@
All codes which are converted can be seen below. NB: \t = Tab \r\n are line breaks~
Sends the KEY and any modifier, For example:
relaykeys-cli.exe keypress:A
Will emulate pressing and releasing the letter A
. What about a shift?
relaykeys-cli.exe keypress:A,LSHIFT
Will emulate pressing the A with Left Shift. i.e. Upper casing the A.
relaykeys-cliexe keypress:RIGHTARROW,LSHIFT,LCTRL
Will press the right arrow, left shit and left control (would select the next word in programs like word)
Left Control/CTRL: LCTRL
Left Shift : LSHIFT
Left Alt/Alt: LALT
(Left) Meta/Windows Key/Mac Key/Command Key: LMETA
Note: On Windows there is generally only one Windows key. So use LMETA to emulate pressing the Windows key
Right Control/CTRL:: LCTRL
Right Shift : RSHIFT
(Right) Meta/Windows Key/Mac Key/Command Key: RMETA
If you are wanting to send two keys with a modifier - send the key - then modifier. E.g. keypress:C,LCTRL
- not the other way round!
If you are sending to iOS or a Mac - remember that they use the Command (LMETA) key - often where windows uses the CTRL key read here for more examples
We also have a limited number of consumer keys - namely volume related (if you need others do let us know)
Volume Up: VOLUP
Volume Down: VOLDOWN
Mute: MUTE
So all the other keys are defined below. We will try and explain what these are when its ambiguous
Emulates holding or releasing one key with a modifer. For example:
relaykeys-cli.exe keyevent:A,LSHIFT,1
Emulates pressing a A
with Shift
Down. To release:
relaykeys-cli.exe keyevent:A,LSHIFT,0
So a classic example is to emulate pressing the Alt key and Tab key. Commonly used to switch applications. To do this you would need to send two commands.
Releases any keys that may have been held down, e.g. a modifier Particularly useful if you need to type on one the receiving device with a different keyboard.
Sends the command to move the mouse x Pixels Right and x Pixels Down. To go in the other direction send negative numbers. Eg. To go Right by 10 and Down by 10
relaykeys-cli.exe mousemove:10,10
and Left by 10, Up by 10:
relaykeys-cli.exe mousemove:-10,-10
Straight up:
relaykeys-cli.exe mousemove:0,-10
Straight down:
relaykeys-cli.exe mousemove:0,10
Straight right:
relaykeys-cli.exe mousemove:10,0
Straight left:
relaykeys-cli.exe mousemove:-10,0
Want a way of repeating a mousemove for a while?
Run the application called mouserepeat.exe which uou will find in the RelayKeys install folder. Run it with mouserepeat.exe -x 10 -y 10
- where that is your mouse direction to move it in. It will then repeat that until you quit the application. To do this run a powershell script:
Stop-Process -Name "mouserepeat"
Sends the Mouse button press. Mouse buttons available:
L: Left
R: Right
M: Middle
F: Scroll Forward
B: Scroll Backward
Behaviours:
click
doubleclick
Note: If you don't provide a behaviour it will hold and release the button for 0 Seconds.
Send a doubleclick:
relaykeys-cli.exe mousebutton:L,doubleclick
Send a right click:
relaykeys-cli.exe mousebutton:R,click
What about dragging?
Activate Drag Start button
relaykeys-cli mousebutton:L,press
User moves mouse
relaykeys-cli mousemove:x,y
User moves mouse some more
relaykeys-cli mousemove:x,y
user activates Drag Stop button
relaykeys-cli mousebutton:0
Adds a delay. Particularly useful when writing a macro and you need to wait for something to happen on the client operating system.
relaykeys-cli delay:1000
Puts in a a delay of 1 second.
On the following commands you can provide a --notify
flag. If so your Operating System will return a system notification. Useful if you dont have access to view the command line. Or if you wish provide a --copy
flag. This will return the results to your pasteboard for you to paste the data back. Be careful with this. It will overwrite any copy/paste functions you may already have.
relaykeys-cli.exe ble_cmd:devname
Returns the currently connected device
relaykeys-cli.exe ble_cmd:devlist
Gets a list of devices that the device has in memory
relaykeys-cli.exe ble_cmd:devadd
Put the device into a pairing state
relaykeys-cli.exe ble_cmd:devreset
Reset the entire stored devices (its like wiping the volatile memory)
relaykeys-cli.exe ble_cmd:switch
Switch the current connected device to the next one in RelayKeys memory
relaykeys-cli.exe ble_cmd:switch:"Name" --notify
Switches BLE device by the name of a device.
relaykeys-cli.exe ble_cmd:devremove=DEVNAME
Remove just one named device from the memory.
relaykeys-cli.exe ble_cmd:reconnect
Tells the daemon/server to try and reconnect to the serial port.
relaykeys-cli.exe daemon:switch_mode
Tells the daemon/server to try and switch between wired
relaykeys-cli.exe daemon:get_mode
Returns current mode
relaykeys-cli.exe daemon:dongle_status
Returns whether it is connected or not
relaykeys-cli.exe ble_cmd:get_mode
Gets the current mode - wired or wireless
relaykeys-cli.exe ble_cmd:switch_mode
Switches mode from Wired -> Wireless and Wireless-> Wired.
Provide a macro file - where each line in a text file is a cli command. For example ios_open_notes.txt found in the macros directory of the installation folder (i.e at C:\Program Files (x86)\Ace Centre\RelayKeys\maccros)
relaykeys-cli.exe -f ios_open_notes.txt
or like this
relaykeys-cli.exe -f Documents/open_ios_notes.txt
where it reads the file from a file path.. or..
relaykeys-cli.exe -f ./open_ios_notes.txt
where it reads the file in folder where current exe is run from\
where ios_open_notes.txt is:
Warning: There is no syntax checking of this document.
Want to send a long string of mouse commands and want to record your movements for a script? Use the RelayKeys-QT app and use the record macro function!