2.4 KiB
Select Word
Module | getreuer/select_word |
Version | 2025-03-07 |
Maintainer | Pascal Getreuer (@getreuer) |
License | Apache 2.0 |
Documentation | https://getreuer.info/posts/keyboards/select-word |
This is a community module adaptation of Select Word for selecting words and lines, assuming conventional text editing hotkeys.
Use
Add the following to your keymap.json
:
{
"modules": ["getreuer/select_word"]
}
Then use one or more of the following keycodes in your layout:
Keycode | Short alias | Description |
---|---|---|
SELECT_WORD |
SELWORD |
Forward word selection. Or with Shift, line selection. |
SELECT_WORD_BACK |
SELWBAK |
Backward word selection. |
SELECT_WORD_LINE |
SELLINE |
Line selection. |
Press SELWORD
to select the current word. Press it again to extend the
selection to the following word. The effect is similar to word selection (W
)
in the Kakoune editor. Or for line selection, press
SELWORD
with shift to select the current line, and press it again to extend
the selection to the following line.
Mac hotkeys
Different hotkeys are needed to perform word and line selection on Mac OS. There are several ways that Select Word can be configured to send the appropriate hotkeys:
-
To hardcode to Mac hotkeys, define in your
config.h
file:#define SELECT_WORD_OS_MAC
-
If OS Detection is enabled, Select Word uses it determine which kind of hotkeys to send.
-
For direct control, define in
config.h
:#define SELECT_WORD_OS_DYNAMIC
Then in
keymap.c
, define the callbackselect_word_host_is_mac()
. Return true for Mac hotkeys, false for Windows/Linux.
See the Select Word documentation for further configuration options and details.