Skip to content

Commit

Permalink
doc: adjust warning in multi`
Browse files Browse the repository at this point in the history
  • Loading branch information
jtroo committed May 20, 2023
1 parent c4d4b4f commit 5afffa6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
16 changes: 12 additions & 4 deletions docs/config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -865,10 +865,6 @@ There is currently no known practical use case for
The `+multi+` action executes multiple keys or actions in order but also
simultaneously. It accepts one or more actions.

This action may result in unexpected or incorrect behaviour when creating a
complicated combination of actions. If you find incorrect behaviour, please
feel free to file an issue.

An example use case is to press the "Alt" key while also activating another
layer.

Expand Down Expand Up @@ -905,6 +901,16 @@ functionality.
)
----

WARNING: This action can sometimes behave in surprising ways
with regards to simultaneity and order of actions.
For example, an action like `(multi sldr ')` will not behave as expected.
Due to implementation details, `sldr` will activate after the `'`
even though it is listed before.
This example could instead be written as `(macro sldr 10 ')`,
and that would work as intended.
It is recommended to avoid `multi` if it can be replaced
with a different action like `macro` or an output chord.

[[mouse-actions]]
=== Mouse actions
<<table-of-contents,Back to ToC>>
Expand Down Expand Up @@ -1262,6 +1268,8 @@ The actions supported in `+macro+` are:
* <<live-reload,live reload>>
* <<fake-keys,fake keys>>
* <<sequences,sequence leader>>
* <<arbitrary-code,arbitrary keycode>>
* <<dynamic-macro,dynamic macro>>

.Example:
[source]
Expand Down
5 changes: 5 additions & 0 deletions src/custom_action.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
//! This module contains the "Custom" actions that are used with the keyberon layout.
//!
//! When adding a new custom action, the macro section of the config.adoc documentation may need to
//! be updated, to include the new action to the documented list of supported actions in macro.

use kanata_keyberon::key_code::KeyCode;

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
Expand Down

0 comments on commit 5afffa6

Please sign in to comment.