Skip to content

Commit

Permalink
doc+log: document and log forceful exit key combo (#608)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtroo authored Nov 5, 2023
1 parent 67fd077 commit 6f48051
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cfg_samples/kanata.kbd
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@ This is a sample configuration file that showcases every feature in kanata.
If anything is confusing or hard to discover, please file an issue or
contribute a pull request to help improve the document.

This sample file has documentation but it is lower effort than the configuration
guide. The configuration guide can be found at:
Since it may be important for you to know, pressing and holding all of the
three following keys together at the same time will cause kanata to exit:

Left Control, Space, Escape

This is for the physical key input rather than after any remappings
that are done by kanata.

This mechanism works on the key input*before any remappings done by kanata.

https://github.com/jtroo/kanata/blob/main/docs/config.adoc
|#
Expand Down
13 changes: 13 additions & 0 deletions docs/config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ part of the project, please be welcome to make a pull request or file an issue.
== Table of contents
toc::[]

== Forcefully exit kanata [[force-exit]]
<<table-of-contents,Back to ToC>>

Though this isn't configuration-related,
it may be important for you to know that pressing and holding all of the
three following keys together at the same time will cause kanata to exit:

- Left Control
- Space
- Escape

This mechanism works on the key input **before** any remappings done by kanata.

[[comments]]
== Comments
<<table-of-contents,Back to ToC>>
Expand Down
4 changes: 4 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ fn cli_init() -> Result<ValidatedArgs> {
log::info!("using LLHOOK+SendInput for keyboard IO");
#[cfg(all(feature = "interception_driver", target_os = "windows"))]
log::info!("using the Interception driver for keyboard IO");
log::info!(
"You may forcefully exit kanata by pressing lctl+spc+esc at any time. \
These keys refer to defsrc input, meaning BEFORE kanata remaps keys."
);

if let Some(config_file) = cfg_paths.first() {
if !config_file.exists() {
Expand Down

0 comments on commit 6f48051

Please sign in to comment.