Live data from Hacker News

Show HN: Espanso: detect a typed keyword and replace it while you're typing

espanso.org

71–77 of 77 posts

Re: Show HN: Espanso: detect a typed keyword and replace it while you're typing

#71
post #69

As someone with quite a few AHK hotstrings, and who does almost all of their day-to-day in Windows, what's the selling point for this software vs AHK? Looks like a great and useful piece of software, but is there a reason to prefer this in cases where AHK is viable?

Hey, the main difference is mostly its cross-platform support, but also forms [1] and (probably) scripts [2]

[1]: https://espanso.org/docs/forms/ [2]: https://espanso.org/docs/matches/#shell-extension

Re: Show HN: Espanso: detect a typed keyword and replace it while you're typing

#72

(Author here) Feel free to ask any question, I'll be happy to answer them :)

It doesn't detect backspace with non-backspace keys under Linux. I'm using the Colemak keyboard layout, and Caps Lock is mapped to Backspace.

Thanks for reporting this issue! I'm currently rewriting the detection mechanism core, so hopefully this problem will be solved in the next version :)

Re: Show HN: Espanso: detect a typed keyword and replace it while you're typing

#73

Earlier quoted context omitted.

Thanks for the replies! One more question if you're up for it: does Espanso suffer from having secure input disabled? I frequently see this with both aText and Alfred: "Secure input is enabled (by loginwindow)" (aText) & "loginwindow seems to be preventing text expansion by locking secure entry" (Alfred)... with no indication as to how to rectify the situation.

Ah nevermind, I see this when I run `espanso start`: "WARNING: An application is currently using SecureInput and might prevent espanso from working correctly." For anyone else who ends up here with the same problem: this blog post was helpful as it suggested that locking & unlocking my system might remove the lock on secureinput created by loginwindow: https://rakhesh.com/mac/macos-find-app-using-secure-input/

Yes, unfortunately there is not much we can do about that, given that macOS does not give us much information :)

Re: Show HN: Espanso: detect a typed keyword and replace it while you're typing

#74
post #63

Earlier quoted context omitted.

Espanso currently supports X11-based linux systems through the X Record Extension [1] and libxdo [2] That said, I'm currently working on another engine based on evdev that could be able to support also Wayland systems. For the linux install see also: https://espanso.org/install/linux/ [1]: https://www.x.org/releases/X11R7.6/doc/libXtst/recordlib.htm... [2]: https://github.com/jordansissel/xdotool

Awesome, would love to give it a try as a Wayland user.

Thanks! your best bet is to activate notification on the issue I linked before :) I'm currently working on it, the detection part is almost done, I'll need to figure out the best way to inject the text after detecting a match

Re: Show HN: Espanso: detect a typed keyword and replace it while you're typing

#75

Earlier quoted context omitted.

Fun fact, Wayland support is the most requested feature [1] and I think it's possible, although we will need to go deeper in the stack and exploit EVDEV [1]: https://github.com/federico-terzi/espanso/issues/287

A nice technical writeup! The daemon approach sounds particularly promising. Have you also thought about a Wayland protocol extension? espanso is not the only program that will want total keyboard access, and it's one of the last big obstacles for a lot of X11 users.

Thanks!

> Have you also thought about a Wayland protocol extension?

I honestly didn't think about that! That might be an option, perhaps when espanso becomes more well-known in the community. Before that, it's unlikely that any change I suggest will make its way into the specification :)

Re: Show HN: Espanso: detect a typed keyword and replace it while you're typing

#76
This is really cool. I just made a keyboard shortcut tool and I wish I had known about this.

Basically, I brought some Windows keyboard shortcuts to linux. Specifically, Alt + 0,N,N,N to type accented characters. For example, è is Alt + 0,2,3,2.

Autokey was too slow, I ended up using a hacky OS keyboard shortcut + bash script approach. Ugly but it works! I should see if I can use espanso for this.

https://github.com/jeremy21212121/linux_accent_hotkeys

https://jeremypoole.ca/posts/windows_keyboard_shortcuts_on_l...

Re: Show HN: Espanso: detect a typed keyword and replace it while you're typing

#77
post #11

First I thought “oh yet another expander”. Then I saw forms! I wanted this for ages. Take my money! :D

Thanks, and by the way, espanso is completely free and open-source! Though if you like it, a donation is always welcomed :)

Done! Sponsored on GH :)
Post reply on HN