Open seelaman opened 3 weeks ago
You can do DigitX
instead. E.g. Digit1
.
https://github.com/jtroo/kanata/blob/main/docs/config.adoc#key-names
maybe cmd-output-keys and including the backspace
.psiso (cmd-output-keys powershell.exe -Command r#"echo "(" bspc bspc ((Get-Date -Format "yyyy-MM-dd").toCharArray() -join " ") ")""#)
If you're willing to test out a more experimental feature, you could see if zippychord is any better for text expansion: https://github.com/jtroo/kanata/pull/1301
The DigitX suggestion worked, thank you.
I'll give the other suggestions a try as well.
maybe cmd-output-keys and including the backspace
.psiso (cmd-output-keys powershell.exe -Command r#"echo "(" bspc bspc ((Get-Date -Format "yyyy-MM-dd").toCharArray() -join " ") ")""#)
This also worked.
If others come across this: The last section of the cmd docs lays out exactly the same use case, complete with date call in bash
pdb (cmd-output-keys bash -c "date +'%F %R' | sed 's/./& /g' | sed 's/:/S-;/g' | sed 's/\(.\{20\}\)\(.*\)/\(\1 spc \2\)/'")
Is your feature request related to a problem? Please describe.
I've been trying to replace Autohotkey or Espanso with Kanata sequences (they've been unreliable for me). So far I was able to put my text expansion onto a key in a layer which is close but I'm wondering if it's possible to expand a typed sequence into a string which also contains numbers directly from sequence loader mode (sldr).
I can almost get there but am running into an issue when trying to have numbers in the macro.
I can add an alias for each number as per the docs but can't use that alias in the macro when it's part of a virtualkey definition.
If there is a simpler way to do this, please let me know, I didn't find anything in the docs.
Describe the solution you'd like.
I would like to enter sldr mode using a key and type any predefined sequence to get it expanded into text.
for example
Describe alternatives you've considered.
I tried putting the macro on a key directly which works. It just limits how many shortcuts I can use and forces me to remember which key each macro is on.
Additional context
Another part (this would go into a separate issue if the numbers question finds a solution) would be to execute a command to replace the output.
for example entering sldr mode, typing "date" and getting today's date expanded as text by running:
I'm already using (cmd ) extensively but would love for it to expand text like a sequence does.
I understand if this is out of scope of course.