I recently read @TimLau 's post about a set of resources he produced for getting keypress overlays into a Shotcut project:
That got me thinking about an HTML/CSS/Javascript program I wrote a couple of years ago to do something similar. I have now titdied this up and made it into a web utility that users can access via any modern browser and tailor using a GUI to create PNG images of keypress combinations. These PNG images, which have transparent backgrounds can then be imported into Shotcut and overlaid onto tutorial-type video to show when these keypress combination are made. e.g.
THAT is another awesome tool @Elusien ! So clever and useful!
I will use it for sure. Thanks a lot!
I’ve been playing with it for a while of course, and here’s my first report
Two small problems I found (Using Chrome on Windows 10):
On first launch, or after refreshing the page, even if the png width is set to 1920 by default, it creates 1080 px wide files. To get a 1920 wide png, I needed to first edit the png width value (a couple of clicks on the spinbox) and set it back to 1920.
The key-margin and keys-padding default settings are 0.2, but pressing the spinbox arrows changes the values by increments of 1 instead of 0.1, resulting in huge increase of the padding or margin space.
And two suggestions:
An option to add (or not) a PLUS sign (without key-border) between the keys. With maybe the possibility of changing it’s size, weight and color?
If possible, adding an Alpha Channel setting to the color selectors? This is not crucial, but could be useful on some occasions.
By the way. While trying the updated version, I noticed this:
These combinaisons won’t work in the utility. They are Chrome shortcuts and they trigger the expected Chrome tasks instead of creating the key images. Ctrl + N (New Chrome window) Ctrl + T (New Chrome tab) Ctrl + W (Close currently used Chrome window or tab)
I didn’t try all the Chrome shortcuts, so maybe there’s more of them that will not work properly in the utility.
It looks as if it won’t be easy to fix the problem with browser shortcuts and still supply the app as a webpage. I can’t find a way of disabling all the browser shortcuts.
So I will try making a standalone NW.JS app instead of a webpage. You will have to download this and install it on your local machine. Hopefully I should have something for testing later today.
The good news is that converting it to an NW.JS app works. It can now handle the browser shortcuts, since it’s no longer running in a browser. I’ll work on the transparency request before packaging up the app.
I can easily create the Windows version, but I don’t have a Linux or MacOS system to test out the packaging for those systems. I’d be very grateful if anyone has such a system and would be willing to try out the pakage and let me know if it works.
I’ll post when the package(s) are ready and how to install them.
I have completed the conversion from webpage to NW,js app. I have been able to test the Windows (64-bit) version, but I don’t have a Linux or MacOS X system to test the 64-bit versions for those. If anyone has such a system I’d appreciate it if they’d test the app out and let me know if it works, or if there are problems.
The app does not need internet access to run. You can download it from my resources webpage here: Resources for Shotcut
Hi @Elusien
I just tried the new app. It looks to be working perfectly so far except for one thing:
Suppose I want to generate Control + C
I start by pressing Control, but if I hesitate more than a fraction of a second to press C the app will generate multiple Control
That’s strange. It doesn’t happen on my system and there is code in the app to ignore repeated keys:
if (e.repeat || e.key.toLowerCase() === 'meta') { return; }
However I have found a bug reported against jQuery that may be causing this problem for you. Could you please edit the file “index.html” and replace line 359, which says:
Again, they work on my system correctly. I’ll look into it today. Just out of interest, do you have any additional keyboards defined for your system? I have English and US.
I really appreciate you trying this out. It’s awkward when I can’t reproduce the problems on my system.