Skip to content

Commit

Permalink
Merge branch 'master' of github.com:UltimateHackingKeyboard/firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
mondalaci committed Oct 5, 2024
2 parents ab29cb7 + 3657a0a commit 4ea9794
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 2 additions & 0 deletions cla/cla-1.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ I have read this Agreement, and fully agree to it by signing it with my GitHub u
- @abcminiuser
- @benedekkupper
- @bodograumann
- @csnyder616
- @dancek
- @eltang
- @ert78gb
Expand All @@ -108,6 +109,7 @@ I have read this Agreement, and fully agree to it by signing it with my GitHub u
- @kenhys
- @larok00
- @Lauszus
- @mhantsch
- @mondalaci
- @nathanph
- @rightaditya
Expand Down
9 changes: 2 additions & 7 deletions doc-dev/reference-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -435,17 +435,12 @@ We allow postponing key activations in order to allow deciding between some scen
- `orGate` will treat the given list of keys as *or-conditions* (rather than as *and-conditions*). Check any presence of mentioned keyIds in postponer queue for the next key press. Implies `anyOrder`.
- `timeoutIn <time (INT)>` adds a timeout timer to both `Shortcut` and `Gesture` commands. If the timer times out (i.e., the condition does not suceed or fail earlier), the command continues as if matching KEYIDs failed. Can be used to shorten life of `Shortcut` resolution.
- `cancelIn <time (INT)>` adds a timer to both commands. If this timer times out, all related keys are consumed and macro is broken. *"This action has never happened, lets not talk about it anymore."* (Note that this is an only condition which behaves same in both `if` and `ifNot` cases.)
- `arg1 - queue idx` idx of key to compare, indexed from 0. Typically 0, if we want to resolve the key after next key then 1, etc.
- `arg2 - key id` key id obtained by `resolveNextKeyId`. This is static identifier of the hardware key.
- `arg3 - timeout` timeout. If not enough keys is pressed within the time, goto to `arg5` is issued. Either number in ms, or `untilRelease`.
- `arg4 - adr1` index of macro action to go to if the `arg1`th next key's hardware identifier equals `arg2`.
- `arg5 - adr2` index of macro action to go to otherwise.
- `resolveNextKeyId` will wait for next key press. When the next key is pressed, it will type a unique identifier identifying the pressed hardware key.
- E.g., create a macro containing this command, and bint it to key `a`. Focus text editor. Tap `a`, tap `b`. Now, you should see `91` in your text editor, which is `b`'s `KEYID`.
- E.g., create a macro containing this command, and bind it to key `a`. Focus text editor. Tap `a`, tap `b`. Now, you should see `91` in your text editor, which is `b`'s `KEYID`.

### Conditions

Conditions are checked before processing the rest of the command. If the condition does not hold, the rest of the command is skipped entirelly. If the command is evaluated multiple times (i.e., if it internally consists of multiple steps, such as the delay, which is evaluated repeatedly until the desired time has passed), the condition is evaluated only in the first iteration.
Conditions are checked before processing the rest of the command. If the condition does not hold, the rest of the command is skipped entirely. If the command is evaluated multiple times (i.e., if it internally consists of multiple steps, such as the delay, which is evaluated repeatedly until the desired time has passed), the condition is evaluated only in the first iteration.

- `if BOOL` allows switching based on a custom expression. E.g., `if ($keystrokeDelay > 10) ...`
- `else` condition is true if the previous command ended due to a failed condition.
Expand Down
2 changes: 1 addition & 1 deletion doc-dev/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ Or, in linux, you can put the following script into your path... and then use it
```
#!/bin/bash
hidraw=`grep 'UHK 60' /sys/class/hidraw/hidraw*/device/uevent | LC_ALL=C sort -rh | head -n 1 | grep -o 'hidraw[0-9][0-9]*'`
hidraw="hidraw`grep 'UHK 60' /sys/class/hidraw/hidraw*/device/uevent | sed -nE 's/.*hidraw([0-9]+)\/.*/\1/p' | sort -rn | head -n 1`"
echo -e "\x14$*" > "/dev/$hidraw"
```
Expand Down

0 comments on commit 4ea9794

Please sign in to comment.