Inputify
Inputify
Inputify
Hello!
I was screen sharing to teach a friend when I realized I used keyboard shortcuts without even noticing it.
Rather than working on my teaching skills, I decided to write a tool to alleviate the problem, and here it is : Inputify is a small program displaying your keyboard inputs on the screen.
It's built with the almighty new C backend and comes with a few options : mouse input, light and dark mode and scaling.
My PureBasic knowledge is rather limited, so there is probably much to optimize or clean up and, what a coincidence, it's open source and hosted on GitHub : https://github.com/LastLifeLeft/Inputify
I'll accept pull requests, bug reports and suggestions!
Oh, and a word of advice : don't forget Inputify on when you type a password while screen sharing. Not that I'd be clumsy enough to do that.
Hello!
I was screen sharing to teach a friend when I realized I used keyboard shortcuts without even noticing it.
Rather than working on my teaching skills, I decided to write a tool to alleviate the problem, and here it is : Inputify is a small program displaying your keyboard inputs on the screen.
It's built with the almighty new C backend and comes with a few options : mouse input, light and dark mode and scaling.
My PureBasic knowledge is rather limited, so there is probably much to optimize or clean up and, what a coincidence, it's open source and hosted on GitHub : https://github.com/LastLifeLeft/Inputify
I'll accept pull requests, bug reports and suggestions!
Oh, and a word of advice : don't forget Inputify on when you type a password while screen sharing. Not that I'd be clumsy enough to do that.
Re: Inputify
Thanks for sharing! That looks like a handy tool.
- NicTheQuick
- Addict
- Posts: 1226
- Joined: Sun Jun 22, 2003 7:43 pm
- Location: Germany, Saarbrücken
- Contact:
Re: Inputify
Is there a Linux version available?
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
Re: Inputify
I was waiting for the release of PB 6.00 for Mac and Linux to throw an eye on port, but it's rather API heavy and I can't guaranty anything.
Re: Inputify
It is very nice, thank you for sharing
It could be good with the keys written horizontally following the typing delay, as done for hotkeys like Ctrl+, Alt+...
It could be good with the keys written horizontally following the typing delay, as done for hotkeys like Ctrl+, Alt+...
- Kwai chang caine
- Always Here
- Posts: 5353
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France
Re: Inputify
I was going to For/Next all the key definitions, but noticed some have different offsets. If they were all the same offsets (like the numbers 0-9), then those definitions can be shrunken down to just a few lines like this:
Compare that to your existing definitions for numbers:
Code: Select all
; Numbers
For c='0' To '9' ; 48 to 57
VKeyData(c)\Text = Chr(c)
VKeyData(c)\Width = 60
VKeyData(c)\Offset = 32
Next
Code: Select all
;{ Numbers ( 48 to 57)
VKeyData(48)\Text = "0"
VKeyData(48)\Width = 60
VKeyData(48)\Offset = 32
VKeyData(49)\Text = "1"
VKeyData(49)\Width = 60
VKeyData(49)\Offset = 32
VKeyData(50)\Text = "2"
VKeyData(50)\Width = 60
VKeyData(50)\Offset = 32
VKeyData(51)\Text = "3"
VKeyData(51)\Width = 60
VKeyData(51)\Offset = 32
VKeyData(52)\Text = "4"
VKeyData(52)\Width = 60
VKeyData(52)\Offset = 32
VKeyData(53)\Text = "5"
VKeyData(53)\Width = 60
VKeyData(53)\Offset = 32
VKeyData(54)\Text = "6"
VKeyData(54)\Width = 60
VKeyData(54)\Offset = 32
VKeyData(55)\Text = "7"
VKeyData(55)\Width = 60
VKeyData(55)\Offset = 32
VKeyData(56)\Text = "8"
VKeyData(56)\Width = 60
VKeyData(56)\Offset = 32
VKeyData(57)\Text = "9"
VKeyData(57)\Width = 60
VKeyData(57)\Offset = 32
;}
Re: Inputify
All those definitions got generated automatically, so I did not even read them... And damn! Applied wherever it was possible, that's about 150 lines saved!
Many thanks.
Re: Inputify
No problem; glad I could help. Not sure if you're aware that wrapping a single character in apostrophes will make PureBasic convert that character to its Asc() code at compile time? It makes your source more readable, like the below, and you also don't need to remember the Asc() numbers for the loop.
Both lines do exactly the same thing when compiled, but the "Better" way makes it more obvious with no comments needed.
Original: For n = 48 To 57
Better: For n = '0' To '9'
Original: For l = 65 To 90
Better: For l = 'A' To 'Z'
Both lines do exactly the same thing when compiled, but the "Better" way makes it more obvious with no comments needed.
Original: For n = 48 To 57
Better: For n = '0' To '9'
Original: For l = 65 To 90
Better: For l = 'A' To 'Z'
Re: Inputify
I definitively didn't know that. Thanks again!
I gave it a try, and it adds some readability issues : we need more space between each input window to get a clear separation, and more movement doesn't help either. So, I won't implement it, sorry.
Re: Inputify
It was just a suggestion, it's beautiful the way it is, especially if you've already tried it.
It can be helpful, to show the shortcuts used CtrL+C, Ctrl+V,... when connecting to remote computers, training, demo,...
Re: Inputify
Thanks for the very useful tool!
Yes, Linux version would be very good. When I have enough time, I will try if it works with Wine under Linux, but a native Linux version would of course be better. Maybe helpers can be found.
Yeah, very nice!
Yes, Linux version would be very good. When I have enough time, I will try if it works with Wine under Linux, but a native Linux version would of course be better. Maybe helpers can be found.
Why OpenSource should have a license :: PB-CodeArchiv-Rebirth :: Pleasant-Dark (syntax color scheme) :: RegEx-Engine (compiles RegExes to NFA/DFA)
Manjaro Xfce x64 (Main system) :: Windows 10 Home (VirtualBox) :: Newest PureBasic version
Re: Inputify
Hi, ❤x1!
Inputify looks very nice, thanks for sharing!
Inputify looks very nice, thanks for sharing!
-
- User
- Posts: 77
- Joined: Thu Jan 16, 2020 10:47 pm
Re: Inputify
What are you using for the UI? If I saw that, I would have guessed it was an embedded web app.
Are those just image gadgets that toggle or are they animated controls?
Are those just image gadgets that toggle or are they animated controls?
My blog/software site: http://dosaidsoft.com/
Re: Inputify
Plain and simple vector drawn canvas, sorry.OgreVorbis wrote: ↑Wed Dec 01, 2021 4:32 am Are those just image gadgets that toggle or are they animated controls?
I thought of using a webview, but the one available within PB seems ancient (gave me a lot of js error) and importing a modern one was way out of scope for such a small project.