4 ms·
Show HN: Keydogger – Minimal keyboard macro for Linux (Wayland)
Works using uinput & wl-clipboard
- gradientsrneat 2y agoLooks like a cross between an IME and autocomplete. Although in my case, I think I would prefer a proper IME, or maybe something like dmenu with fuzzy search, to invoke on an "as needed" basis.
- jarusll 2y agoDmenu like fuzzy search does make sense when you have alot of expansions. I'll add it as I find the need for it myself.
- knighthack 2y agoLook into Espanso as well. Works great, and is cross-platform.
- playingalong 2y agoThe readme hardly explains what it does. Is it a keyboard macro service? E.g. for a given keyboard shortcut I get a predefined sequence of keys pressed?
- kleiba 2y agoIt looks like dabbrev in Emacs maybe?!
- jarusll 2y agoLooked up `abbrev-mode` and that is a correct analogy. Abbrev mode also handles emojis, pretty cool. But then it's Emacs so I shouldn't be surprised. Offtopic, I wish my younger self followed RTFM when I used to use Emacs.
- diggan 2y agoI think the GIF is supposed to give the breakdown. As I understand, type "@mymacro" and it can expand it to whatever you define. Wouldn't hurt to have a description in text though...
- freedomben 2y agoIt's mysterious to me as well, but yeah after looking through the code briefly I think you define macros in the keydoggerrc file, and then keydogger watches the clipboard for triggers and responds accordingly. I love the idea, still a bit too much in the dark on the implementation to have an opinion though. Given the highly sensitive nature of the clipboard, I appreciate how small the app is because it's auditable. OP: Cool project, thanks for sharing!
- jarusll 2y agoYou get it perfectly. Being auditable was one of the priority which is exactly why it's small. Regarding the clipboard, it's a third party dependency. I looked into implementing Wayland clipboard myself but it is too deep Wayland. The only reason clipboard exists is because I cannot send non-printable characters using uinput.
- jarusll 2y agoI do realise it now that it's missing it's usage. It's a simple keyboard macro which supports all printable characters for triggers and everything for expansions. It sends native key presses if all the expansion are printable characters. If not, it uses clipboard and sends `Ctrl+V`
- weinzierl 2y agoI hate to be that guy, but the name is neither helpful to explain what it does nor will it facilitate adoption. Show me the IT department that won't freak out when it sees a process called "keylogger". Apart from that I will certainly try it because I have a use for a lightweight one job - one tool kind of typing helper. I guess others will too.
- guilhas 2y agoMy workstation was lockdown for downloading ProcessHacker
- zamadatix 2y agoI have a feeling any IT place that's fuzzy matching process names to raise alarms on "keydogger" is not the kind of place that's going to let users install 3rd party programs with access to /dev/uinput to customize their Wayland on Linux install in the first place. Nor should every open source app be worried about businesses or user growth rate. I'm not sure what the origin of "keydogger" is but at least there aren't 10 apps with the name and it's pronounceable.
- jarusll 2y agoI do agree the README was terrible. I've fixed it.
- RadiozRadioz 2y agoThe name is teetering on the edge of hilarity for British users.
- beachy 2y agoTriggering at both a security and a sexual deviancy level.
- atsaloli 2y agoThis is exactly what I wanted (a macro for my email address). Thanks!
- k33st 2y ago[flagged]
- tapoxi 2y agoNot only off topic, but some things are completely wrong. "Wayland breaks games" being a prime example despite the most popular Linux gaming platform, Steam Deck, being Wayland based (gamescope)
- Zambyte 2y agoMost of the things that aren't wrong boil down to "X program thing doesn't work on Wayland, is there a Wayland equivalent?" to which the answer is "yes".
- cl3misch 2y agoYou are free to stay on X11?
- lompad 2y agoThat ship has already sailed I'm afraid. Instead of running against windmills, try submitting patches and constructively improving the thing - it isn't going to go away, that much is safe to say. Every day yet another distro adopts it, at a steadily increasing pace. Build extension packs, workarounds, etc. - similar to all the tools unfucking gnome 3 did, instead of fighting a hopeless battle.
- nsajko 2y agoPlease don't FUD.
- lompad 2y agoI don't see FUD anywhere in my post. Did you accidentally reply to the wrong person? My point was essentially, that if he thinks wayland is this bad, the poster should help improve it to their liking, instead of ranting - it's pretty widely adopted now, and just like systemd, little more than a few minor holdouts are going to be left a few years down the line. Now, keep in mind, I'm not claiming that wayland is good or bad - just, that complaining is unproductive and improving helps much more.
- guilhas 2y agoThere is Expanso for xorg https://espanso.org/ https://espanso.org/
- jarusll 2y agoIt works on Wayland as well AFAIK. I looked up espanso for expanding emojis and it seems they too use `wl-clipboard`
- guilhas 2y agoIt does, but it has some annoying issues open, depending on environment, as Wayland support was added later But someone using Wayland and Expanso can probably comment their experience I would use them conditionally
- rabbitofdeath 2y agoThis is one of the first things I install on new linux machines - such a great tool.
- deleted 2y ago[deleted]
- n8henrie 2y agoAnd for Wayland, and macOS, and windows! Edit: also, "Espanso"
- lompad 2y agoHow does it compare to kanata and kmonad? Found especially kanata a delight to use, while being both minimal, if needed, and maximally feature-filled if desired.
- jarusll 2y agoIt is not meant to compete with feature rich programs. Keydogger does one thing and it does it well. If you think it's misbehaving in any way, it's so small you can read and confirm that behaviour.
- lompad 2y agoI see. Thanks for the clear explanation, it looks quite interesting for super quick setups. Cheers!
- mmphosis 2y agoThere is AutoKey for Linux and X11.
- bottom999mottob 2y agoAutoKey definitely has more features than this, but I think this looks easier to automate with pipes after a cursory look at the repo.
- BiteCode_dev 2y agoAnd it can wonderfully be programmed in Python. I miss it in wayland. It works sometimes, and sometimes not, which kinda defeat the purpose.
- tmtvl 2y agoThat's one tradeoff in Wayland versus the X Windowing System: if you want a process with the ability to send keystrokes X supports it while under Wayland you'll have to use compositor-specific facilities for every compositor you're willing to support (GNOME, KDE, wlroots, Weston,...).
- blahgeek 2y agoYeah. Although X11 is stable and mature and already have every tools we need, apparently Wayland is the new cool thing and we now need to reinvent every wheels (and sometimes for each WMs separately).
- bananamerica 2y agoSo it's text expansion. Maybe you should just call it that? Also I 100% thought it was a keylogger with some relation to a sex act in the UK, which is why I clicked in the first place. Maybe not a great name for something as innocuous and not entirely erotic like text expansion.
- jmole 2y agoyou know what I really want? A macro for copy and paste, so I can re-map it to whatever key combination I want across all apps in linux.
- supercheetah 2y agoI've been using Ydotool[1] for this, and it works really well. 1. https://github.com/ReimuNotMoe/ydotool https://github.com/ReimuNotMoe/ydotool