Comments (5)
You can use modes for that. Make ctrla activate your mode, then make d trigger your desired action when in that mode. The example configuration has lots of bits that you can piece together to do this.
from skhd.
@dominiklohmann thank you
from skhd.
@dominiklohmann
Ok. I tried your setup. Works as well. But I not sure that its working similar to tmux or vim etc.
How I can define action in some test mode with executing command and immediately exit to default mode?
# from 'default' mode, activate mode 'test'
alt - d ; test
# from 'test' mode, activate mode 'default'
test < alt - d ; default # there is exit to default without executing command
test < j : chunkc tiling::window --focus south; default # executing command only. We are stay in test mode still
according docs
@ = capture keypresses regardless of being bound to an action
but action has not sample exec command and exit mode
## action = <keysym> ':' <command> | <keysym> '->' ':' <command>
## <keysym> ';' <mode> | <keysym> '->' ';' <mode>
from skhd.
Your issue is in this line:
test < j : chunkc tiling::window --focus south; default # executing command only. We are stay in test mode still
Everything after the :
is being executed as a shell command.
Instead what you want to have is this:
# toggle mode "test" using alt-d
alt - d ; test
test < alt - d ; default
# execute command in mode "test", then leave mode by simulating alt-d keypress
test < j : chunkc tiling::window --focus south; skhd -k "alt - d"
from skhd.
it works. Thank you
from skhd.
Related Issues (20)
- Passing through modifier keys HOT 2
- Hotload of config file not working when symlinked HOT 2
- cmd and pageup issues
- Bindings matched with `*` inside `proc_map_lst` doesn't work as expected HOT 1
- skhd getting keypres after other apps HOT 2
- Output keypresses but using a different input source (language)
- command using jq works when running from command line but not as a service HOT 1
- 0x37 aka print screen HOT 1
- zsh:1: command not found: yabai HOT 5
- cmd - 0x38 (printscreen) is moving window to another workspace HOT 1
- Cannot build
- `zsh:1: command not found: yabai` - only when running the service HOT 2
- How to map simple key chords like emacs? HOT 1
- Move window to space not working on macOS Sonoma 14.5 HOT 3
- Multiple action hotkeys not working HOT 2
- Hotkeys often stop working after the first time they work. HOT 5
- Can't use alt key for other things while skhd is running (e. g. backslash)
- send key without without being interpreted by skhd
- previous/next keys not working on M3 mac
- Simple key mapping doesn't work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skhd.