Sending a combination of keystrokes

Forum for software developers to discuss BCI2000 software development
Locked
victor_uva
Posts: 9
Joined: 13 Jan 2014, 07:13

Sending a combination of keystrokes

Post by victor_uva » 13 Jan 2014, 07:20

Hi,

I am using the KeystrokeExpression in order to transform P3Speller selections into keystrokes. My expression detects if the SelectedRow state is greater or equal than 2 and send a 'b' or an 'i' depending on the result.

But I have a problem when I want to send a combination of keystrokes like "CTRL+R", because I know what is the code for the CTRL Key (0x11) and what is the code for the R Key (0x52), but I don't know how to send it together.

¿Can you solve my problem?

Code: Select all

NewRow:=(SelectedRow>=2)?66:73;zero:=(SelectedRow!=0)?NewRow:0;result:=(zero==prev)?0:zero;prev:=zero;result
When 66 is 'b' and 73 is 'i'.

Thanks!

victor_uva
Posts: 9
Joined: 13 Jan 2014, 07:13

Re: Sending a combination of keystrokes

Post by victor_uva » 15 Jan 2014, 06:03

I have been searching about this and i have found that a combination of keystrokes can be sent by HOTKEYS (IShellLink::GetHotKey).

CTRL hotkey is 0x0200 and 'B' key is 0x0042, so the combination would be: CTRL+B=0x0242 (or 578 in decimal). But it does not work in the KeyStroke Expression.

Locked

Who is online

Users browsing this forum: No registered users and 1 guest