Keyboard Typing Simulation

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Keyboard Typing Simulation >

Keyboard Typing Simulation

SEK. - Set Extended Key-State

Previous Top Next


MiniRobotLanguage (MRL)

 

SEK. Command

Set Extended Key-State

 

 

Intention

 

The SEK.-Command has two modes of operation.

 

In Mode 1, it can be used to set the state of NUMLOCK, CAPSLOCK and SCROLLLOCK.

What you set is really the "state of the keyboard". Not "the state of the button".

 

SEK.-will change the "real thing" exactly to the value that you provide in P2.

 

' Will set CAPSLOCK to ON

SEK.CAPSLOCK|1

 

In Mode 2, it can be used to set the state of the SHIFT, CTRL or the ALT-Key and others, see detailed list below. In this case you really change the state of the key, just like if you press or release the key physically.

Of course, if CAPSLOCK is activated, you will get a "1" if you check for SHIFT, even if you try to release either of the SHIFT keys.

 

' Will release the left SHIFT Button

SEK.LSHIFT|0

' Will press the right SHIFT Button

SEK.RSHIFT|1

 

You can read more about Keyboard-Simulation and Text-Boxes in the chapter:

1.9.1.6 Edit-Textbox Control

 

 

 

Syntax

 

SEK.P1[|P2]

 

 

Parameter Explanation

 

P1 - VAR or numeric

 

P2 - (optional) numeric, variable or value 0/1 . If omitted 0 is used.

 

Parameter-List for P1:

 

SHIFT         - any shift key (keyboard Shift-state)

LSHIFT        - only left Shift-Key

RSHIFT        - only right Shift-Key

STRG,CTRL     - any Ctrl key (keyboard Ctrl-state)

LSTRG,LCTRL   - only left Ctrl-Key

RSTRG,RCTRL   - only right Ctrl-Key

MENU,ALT      - any ALT key (keyboard ALT-state)

LMENU,LALT    - only left ALT-Key

RMENU,RALT    - only right ALT-Key

NUMLOCK,NUM   - keyboard NUMLOCK-State

CAPSLOCK,CAPS - keyboard CAPSLOCK-State

SCROLLOCK,SCROL,SCROLL - keyboard SCROLLLOCK-State

 

 

 

Example

 

'*****************************************************

' EXAMPLE 1: SEK.

'*****************************************************

SEK.CAPSLOCK|1

GEK.SHIFT|$$STA

DBP.$$STA

GEK.LSHIFT|$$STA

DBP.$$STA

GEK.RSHIFT|$$STA

DBP.$$STA

SEK.CAPSLOCK|0

ENR.

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

See also:

 

    1.9.1.6 Edit-Textbox Control

    ! Keyboard-Keycode-List

    GEK. - Get Extended Key-State

    GKS. - Get Key-State

    SKP. Send-Key-Press

    SKT. - Send-Key-Text

    KYD. - Key Down

    KYU. - Key Up

    RST. - Replace Selected Text

    SDT. - SenD-window-Text