3 ms·
I was having problems with my hands from muscle exhaustion due to typing. My doctor recommended I should use an alarm clock, to remind me to not type for more t
by TT-392 4y ago
I was having problems with my hands from muscle exhaustion due to typing. My doctor recommended I should use an alarm clock, to remind me to not type for more than a few minutes at a time. Instead, I thought, I could do better. So I made the following program:
It is a program that has a countdown, lets say, 100 key presses, and every time you press a key, it goes down by one, and every, lets say second, it recovers 1 key. When it reached like 20 keys, I got a notification, and when it reached 0, I got a typing timeout (I disabled my keyboard). This forced me to, type more efficiently, to use more efficient shortcuts and to think about code before I wrote it more. In the end, this actually helped a lot for my hands, and I was still able to work on stuff.
I ended up never releasing it, because I was too lazy to put in the work to get it to a usable state for other people on other computers.
- sjducb 4y agoThat sounds great. Can you put it up on GitHub so I can use it please?
- TT-392 4y agoI mean sure, but I wasn't exaggerating when I said it is probably not usable on other peoples computers. It only works on linux, it doesn't work on wayland, and because I am using xinput to disable the keyboard, you will have to replace the device name in blockKeyboard.py: https://github.com/TT-392/keyAlarm/tree/master https://github.com/TT-392/keyAlarm/tree/master It shouldn't be too difficult to write your own though, so, if anyone wants to do so, feel free to steal the idea.
- djbusby 4y agoWorks on my machine. Thanks! (Xfce)
- n3t 4y ago> I mean sure, but I wasn't exaggerating when I said it is probably not usable on other peoples computers. That's totally okay! I love when people share their "works on my machine programs". Just say upfront that it's your personal tool so others won't expect production-grade software. The code might inspire others, let others fork it (if a license says it's okay), teach code readers about some technique or tool, or just be fun to poke around. I, for one, learned about pyxhook while reading your code. Thank you!
- TT-392 4y agoThat is nice, as for a license, I think half of the program is someone else's keylogger code I found somewhere online, so putting my own license on there seems shitty. But I put a line in the README that anyone can steal the idea of the concept of the program, if someone is gonna do that, they are gonna want to rewrite everything anyways.
- polyterative 4y agoI need this, got rsi
- TT-392 4y agoProbably won't be of any use, but here is the code: https://github.com/TT-392/keyAlarm/tree/master https://github.com/TT-392/keyAlarm/tree/master
- mkl 4y agoI use Workrave (https://workrave.org/ https://workrave.org/) for the same purpose. It's time-based rather than count-based, and takes mouse into account as well as keyboard.
- TT-392 4y agoRight, the mouse is a concern for most people as well, I never really considered that part since with my i3wm + vim setup, I basically never touch the mouse anyways.
- jcparkyn 4y agoToken bucket rate limiting for your fingers