Skip to content

Commit 93c7514

Browse files
committed
improve docs
1 parent 72ae6b3 commit 93c7514

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

inputremapper/injection/macros/macro.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
class Variable:
7979
"""Can be used as function parameter in the various add_... functions.
8080
81-
Parsed from strings like `$foo` in `repeat($foo, k(KEY_A))`
81+
Parsed from strings like `$foo` in `repeat($foo, key(KEY_A))`
8282
8383
Its value is unknown during construction and needs to be set using the `set` macro
8484
during runtime.

readme/macros.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Bear in mind that anti-cheat software might detect macros in games.
8888
> Examples:
8989
>
9090
> ```c#
91-
> modify(Control_L, k(a).k(x))
91+
> modify(Control_L, key(a).key(x))
9292
> ```
9393
9494
### hold
@@ -107,9 +107,12 @@ Bear in mind that anti-cheat software might detect macros in games.
107107
108108
### hold_keys
109109
110-
> Holds down all the provided symbols like a combination.
110+
> Holds down all the provided symbols like a combination, and releases them when the
111+
> actual key on your keyboard is released.
111112
>
112113
> An arbitrary number of symbols can be provided.
114+
>
115+
> When provided with a single key, it will behave just like a regular keyboard key.
113116
>
114117
> ```c#
115118
> hold_keys(*symbols: str)
@@ -121,6 +124,7 @@ Bear in mind that anti-cheat software might detect macros in games.
121124
> hold_keys(KEY_LEFTCTRL, KEY_A)
122125
> hold_keys(Control_L, Alt_L, Delete)
123126
> set(foo, KEY_A).hold_keys($foo)
127+
> hold_keys(KEY_B)
124128
> ```
125129
126130
### mouse
@@ -237,7 +241,7 @@ Bear in mind that anti-cheat software might detect macros in games.
237241
> Examples:
238242
>
239243
> ```c#
240-
> if_capslock(key(KEY_1), key(KEY_2))
244+
> if_capslock(hold_keys(KEY_1), hold_keys(KEY_2))
241245
> ```
242246
243247
### if_numlock
@@ -251,7 +255,7 @@ Bear in mind that anti-cheat software might detect macros in games.
251255
> Examples:
252256
>
253257
> ```c#
254-
> if_numlock(key(KEY_3), key(KEY_4))
258+
> if_numlock(hold_keys(KEY_3), hold_keys(KEY_4))
255259
> ```
256260
257261
### if_tap

readme/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Here is an example configuration for preset "a" for the "gamepad" device:
182182
{"type": 1, "code": 307}
183183
],
184184
"target_uinput": "keyboard",
185-
"output_symbol": "k(2).k(3)",
185+
"output_symbol": "key(2).key(3)",
186186
"macro_key_sleep_ms": 100
187187
},
188188
{

0 commit comments

Comments
 (0)