Advanced Key Bindings ⚪⚫ | Sansar Store
Advanced Key Bindings ⚪⚫

Advanced Key Bindings ⚪⚫

FREE

You need to own this item to leave a rating.

0 ratings

This is a keybinding script, inspired by the Hotkey simple script, that allows you to bind combos of commands per user, including toggling commands, and fire repeated events while a combo is pressed or toggled. Also included is auto enable for grab points, sit points, and trigger volumes. This saves you from doing this with several simple scripts, while not having to rely on the event system.

It accepts keybindings in the format '<command combination>|<combination on event>|<combination off event>|<repeats per second>'.

'Repeats per second' means how many times the 'combination on event' should repeat per second when the key combination is pressed. Set to 0 to fire only once.

'Combination on event' is triggered when the whole key combination is pressed.

'Combination off event' is triggered when the combination is no longer pressed.

Key combination is a comma separated value of commands using the following syntax:
+Key - Key is pressed
-Key - Key is released
~Key - Key was toggled

Examples:
Trigger 'turn_on' once when F is pressed, and 'turn_off' when F is released:
+PrimaryAction | turn_on | turn_off

Trigger 'reload_gun' once when R is released:
-SecondaryAction | reload_gun

Trigger 'run' when Shift is pressed first time, and trigger 'walk' when pressed a second time:
~Modifier | run | walk

Trigger 'drop_item' once when F is pressed and held and mouse click is released:
+PrimaryAction,-Trigger | drop_item

Trigger the 'shoot_weapon1_fast' event 5 times a second while mouse click and shift are pressed, and the user pressed 1 before (toggled on), and trigger 'stop_shooting' after the combination is no longer true:
+Trigger,+Modifier,~Action1 | shoot_weapon1_fast | stop_shooting | 5

Supported keys:
Trigger - Left Mouse Button
PrimaryAction - F
SecondaryAction - R
Modifier - Shift
Action1 to Action0 - Number keys 1 to 0
Confirm - Enter
Cancel - Escape
SelectLeft - Left arrow
SelectRight - Right arrow
SelectUp - Up arrow
SelectDown - Down arrow
Keypad0 to Keypad9 - Numberpad keys 0 to 9
KeypadEnter - Numberpad Enter

Changelog:
1.0.0 - initial release
1.0.4 - bug fixes

* I allow buyers to resell this script as part of their own products, but not as a standalone script

Item name
AdvancedKeyBindings [1.0.6]
Min. resale price
50