[HN Gopher] Show HN: Keydogger - Minimal keyboard macro for Linu...
___________________________________________________________________
Show HN: Keydogger - Minimal keyboard macro for Linux (Wayland)
Works using uinput & wl-clipboard
Author : jarusll
Score : 57 points
Date : 2024-06-15 17:03 UTC (5 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| playingalong wrote:
| The 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?
| diggan wrote:
| I 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 wrote:
| It'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 wrote:
| You 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 wrote:
| I 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`
| diggan wrote:
| Thanks! I think maybe not everyone understands exactly what
| a "keyboard macro" is, that you type something and it fills
| out predefined text. At least judging by some comments here
| :)
| weinzierl wrote:
| I think more people know what a keylogger is and are
| confused by that.
| lukasb wrote:
| I'm used to user-facing macros (as opposed to say a Lisp
| macro) being scripts triggered by a keyboard shortcut, so
| the terminology was confusing to me. Calling this "text
| expansion" or "text substitution" would have made immediate
| sense.
| kleiba wrote:
| It looks like dabbrev in Emacs maybe?!
| jarusll wrote:
| Looked 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.
| weinzierl wrote:
| I 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 wrote:
| My workstation was lockdown for downloading ProcessHacker
| zamadatix wrote:
| I 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.
| RadiozRadioz wrote:
| The name is teetering on the edge of hilarity for British users.
| abraae wrote:
| Triggering at both a security and a sexual deviancy level.
| atsaloli wrote:
| This is exactly what I wanted (a macro for my email address).
| Thanks!
| guilhas wrote:
| There is Expanso for xorg
|
| https://espanso.org/
| jarusll wrote:
| It works on Wayland as well AFAIK. I looked up espanso for
| expanding emojis and it seems they too use `wl-clipboard`
| guilhas wrote:
| It 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 wrote:
| This is one of the first things I install on new linux machines
| - such a great tool.
| lompad wrote:
| How 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 wrote:
| It 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 wrote:
| I see. Thanks for the clear explanation, it looks quite
| interesting for super quick setups.
|
| Cheers!
| mmphosis wrote:
| There is AutoKey for Linux and X11.
| bottom999mottob wrote:
| AutoKey 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 wrote:
| And it can wonderfully be programmed in Python. I miss it in
| wayland. It works sometimes, and sometimes not, which kinda
| defeat the purpose.
___________________________________________________________________
(page generated 2024-06-15 23:00 UTC)