For Videotutorials: Automatic Displaying Clicked Keys

Posted By: Pappenheimer

For Videotutorials: Automatic Displaying Clicked Keys - 07/04/10 23:46

I want to capture video tutorials, I already did, but I still miss a tool that automatically displays the pressed keys and mouse buttons.

Question 1:
Is there already an inexpensive tool somewhere in the net?
(the newest version of Camtasia is quite expensive)

Question 2:
Is there a way to program such a tool without much effort?
(in any language)

Question 3:
Is it possible to program such a tool with Lite-C without knowing much about the window API and such?
Posted By: Quad

Re: For Videotutorials: Automatic Displaying Clicked Keys - 07/04/10 23:55

q3: i guess it's possible that you could make a small screen that shows every key press and always stays on top in lite-c.

edit: well, took a quick look, you need some winapi, probably:
SetWindowsHookEx with WH_KEYBOARD and keyboardProc Callback.
Posted By: Pappenheimer

Re: For Videotutorials: Automatic Displaying Clicked Keys - 07/05/10 00:06

I tried the digital.c in the samples folder, and it keeps showing while I was in in a different program, but it didn't receive a key, while it updated the time.
Posted By: Quad

Re: For Videotutorials: Automatic Displaying Clicked Keys - 07/05/10 00:08

that's why you need to install a keyboard hook using winapi - to be able catch keys while your window is not on "focus" -
Posted By: Pappenheimer

Re: For Videotutorials: Automatic Displaying Clicked Keys - 07/05/10 00:11

Thanks for your fast and informative replies! laugh
I have to go to bed now, because of my work tomorrow.
See ya.
Posted By: Quad

Re: For Videotutorials: Automatic Displaying Clicked Keys - 07/05/10 00:14

further, a systemwide-hook MAY not be possible without a dll, thus it may not be possible with lite-c.

tried it, it's possible if you do not mind going a little low-level.
Posted By: Quad

Re: For Videotutorials: Automatic Displaying Clicked Keys - 07/06/10 01:01

I created a tool for that:

download:
http://dl.dropbox.com/u/4979264/kbhook.rar

Automatically changes size

You can drag it to anywhere in the screen, always stays on top.

Right click brings up the settings, so far window alpha, background and foreground colors are changeable. If you open settings at far right or far bottom side of the screen you would not be able to click on the exit or save button, in this case press esc it saves settings.

To close the app either right click on the app window and click exit in settings menu, or close it from the taskbar.

open for suggestions.
Posted By: Pappenheimer

Re: For Videotutorials: Automatic Displaying Clicked Keys - 07/06/10 15:01

Wow, didn't expect that! laugh
It says " can't hook the keyboard, terminating." frown
Posted By: Quad

Re: For Videotutorials: Automatic Displaying Clicked Keys - 07/06/10 16:36

you may need to run it as administrator and make sure your antivirus does not think it's a keylogger.
Posted By: Pappenheimer

Re: For Videotutorials: Automatic Displaying Clicked Keys - 07/06/10 21:19

I have Windows XP and my Antivirus would throw a message as well. frown
Posted By: Rei_Ayanami

Re: For Videotutorials: Automatic Displaying Clicked Keys - 07/06/10 21:25

I also tried it:

cant hook the keyboard, terminating.

after that some Turkish(?) language...
Posted By: Quad

Re: For Videotutorials: Automatic Displaying Clicked Keys - 07/06/10 23:10

it's same message, only in Turkish. I will try to figure out the problem.
Posted By: Quad

Re: For Videotutorials: Automatic Displaying Clicked Keys - 07/07/10 15:00

here is the new version with a little change and a more informative error message:

http://dl.dropbox.com/u/4979264/kbhook_d.rar

i tried in 2 win7 and 1 winvista pcs all worked fine, so i dont really know if it's fixed or not. if it's still cant hook please post the error code here.
Posted By: Pappenheimer

Re: For Videotutorials: Automatic Displaying Clicked Keys - 07/07/10 17:00

"can't hook.... error code 1428"
Posted By: Quad

Re: For Videotutorials: Automatic Displaying Clicked Keys - 07/07/10 17:40

according to this page, i should pass a module as parameter, but i do not use a module so...

http://msdn.microsoft.com/en-us/library/ms681385(v=VS.85).aspx

i have something in my mind let's see if that works.
Posted By: Pappenheimer

Re: For Videotutorials: Automatic Displaying Clicked Keys - 07/09/10 15:07

Quadraxas, sorry for causing these inconveniences! I really appreciate your efforts.
I wanted to use such tool for video tutorials with different programs, but I am already quite satisfied, if I got such thing working with blender, because there it is most important to know the shortcuts and mouse buttons you use within a tut.

Maybe, in the blender forums there is already such a tool fro blender.
Posted By: Quad

Re: For Videotutorials: Automatic Displaying Clicked Keys - 07/09/10 15:24

I actually tried some stuff but i could not get it to work on XP, looks like i have to go the external dll way for XP, it will take some time, i will look in to it in a couple of days.(3-5)
Posted By: Pappenheimer

Re: For Videotutorials: Automatic Displaying Clicked Keys - 07/09/10 16:17

I found something, although I still have to investigate a bit how it works and whether it serves its purposes well:

http://www.blendernation.com/tool-to-display-blender-keystrokes-in-video-tutorials/

http://www.romeosa.com/osdHotkey/help.html
Posted By: Pappenheimer

Re: For Videotutorials: Automatic Displaying Clicked Keys - 04/09/11 17:45

Quadraxas, I just tried your tool on my new Windows7 system.
Wow, great, it works now for me, and it looks way better than that tool that I used before, because it doesn't show the ugly window frame.
You can see here some video tutorials that I made with the osdHotkey:
youtube video tutorials and others of Pappenheimerr

Unfortanately your tool doesn't show the mouse buttons and mouse wheel.
osdHotkey displays: mouse_right, mouse_left, mouse_middle, mouse_wheel_up and mouse_wheel_down.
It is important for tutorials with Blender for instance.

Maybe, the displayed key shouldn't disappear immidiately, better it fades away.

When you add an option to add an own picture with alpha channel, and the option to choose ones own font, it is almost perfect.
Then everyone can create the exact outfit needed for his specific tutorial.

Thank you for your kind contribution.
Posted By: Quad

Re: For Videotutorials: Automatic Displaying Clicked Keys - 04/10/11 00:56

all should be possible, but i do not quite understand where would you want to put your a picture to?
(a a window frame?)
Posted By: Pappenheimer

Re: For Videotutorials: Automatic Displaying Clicked Keys - 04/10/11 11:27

As a window frame, like in digital.c, yes.
Posted By: Quad

Re: For Videotutorials: Automatic Displaying Clicked Keys - 04/10/11 15:41

alright, i will look into it, sometime next week.
Posted By: Pappenheimer

Re: For Videotutorials: Automatic Displaying Clicked Keys - 04/11/11 18:03

Seems that my version of Camtasia can't handle the 'key hook' when it is (semi-)transparent.
So I don't know whether it works with a picture with alpha transparency, but a picture without alpha channel might be sufficient.

Thank you for looking into this.
Posted By: Pappenheimer

Re: For Videotutorials: Automatic Displaying Clicked Keys - 04/21/11 10:05

Maybe, you find at least some time to look into the following parts of my feature requests?

- Showing mouse_right, mouse_left, mouse_middle, mouse_wheel_up and mouse_wheel_down as well.

- The displayed key shouldn't disappear immidiately, better it fades away.
Posted By: Quad

Re: For Videotutorials: Automatic Displaying Clicked Keys - 04/21/11 11:02

i will look in to it sometime.

added mouse_left,right,middle, and scroll(no direction yet)
fading away is semi-implemented, i have to create some sort of string cache or key_press rememberin logic for working version.

anyway, here is the source at it's current state, dirty and undocumented code, but feel free to look in to it.
http://dl.dropbox.com/u/4979264/kbhook_source.rar
Posted By: Pappenheimer

Re: For Videotutorials: Automatic Displaying Clicked Keys - 04/21/11 11:57

Wow. This already works great with my version of Camtasia! Many thanks!
Tell me, how can I do you a favour! laugh
© 2024 lite-C Forums