[Script] KeypressOSD - Display key press on screen

Post your working scripts, libraries and tools
User avatar
Drugwash
Posts: 560
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: [Script] KeypressOSD - Display key press on screen

26 Nov 2017, 12:50

robodesign wrote:On XP it's a plain text control where & underlines the next character.

Try the SS_NOPREFIX (0x80) style for the text field. ;)
robodesign wrote:Shift + [numpad keys] does not work with AHK :-).
One less to worry about. :)
robodesign wrote:The INI file updates only when you use the exit command or when you change something at preferences.
Personally I think it should update right after a script update and also on restart or at least at startup. In case of a bug report that requires the settings file that information would be inaccurate, creating confusion and unnecessary extra discussions. ;)

robodesign wrote:I will think about your suggestions. Thank you ;-).
Thank you for your work and for being open to new ideas. :thumbup:
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
robodesign
Posts: 349
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: [Script] KeypressOSD - Display key press on screen

26 Nov 2017, 13:07

@burque505:

I think you are reffering to a layout I do not support.
Please go to Typing mode window and tell me the exact code.

I have support for the following Spanish kbds:
LangRaw_0000040a = SPANISH (traditional)
LangRaw_0001040a = SPANISH (variant)
LangRaw_0000080a = SPANISH MEXICAN

I would like to add support for more Spanish and English layouts. How to add more kbds in Win 10? I only managed to find these three.

@Drugwash: fixed that now for &. Thank you very much.

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
robodesign
Posts: 349
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: [Script] KeypressOSD - Display key press on screen

26 Nov 2017, 15:07

Quick update: i installed Win 7 in Virtual Box and discovered that keyboard detection does not work, but I think I can fix it. I will work on this tomorrow.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
burque505
Posts: 446
Joined: 22 Jan 2017, 19:37

Re: [Script] KeypressOSD - Display key press on screen

26 Nov 2017, 17:55

Hi Marius, the layout I have is 0x40A0C0A. I see no less than 18 different Spanish keyboards available from Control Panel! That'll be some work ...
As far as that detection goes in Win7, as it's written now it appears to detect the keyboard, because it displays it for me.
Regards,
burque505
robodesign
Posts: 349
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: [Script] KeypressOSD - Display key press on screen

27 Nov 2017, 03:50

Hello, burque505!

The keyboard detection on Win 7 is mostly ... not working. It currently detects the default/main keyboard layout and then.... when user activates "Monitor layouts", that's when it goes wrong. I detect only that the keyboard layout changed, but not very precise.

i will add support for 5 more Spanish layouts, or more. I suppose they are clones or very similar.

I re-uploaded the AHK. It no longer reloads senselessly. Release version is: v3.58.1.

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
robodesign
Posts: 349
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: [Script] KeypressOSD - Display key press on screen

28 Nov 2017, 08:33

Hello, guys!

The new version is here:

v3.60 (2017-11-28)
- new keyboard detection system; works on Win 7/10

It was very hard to make this work...

Please test it on your systems. It may work on XP as well. For me, it works in Win 10 x64 and Win 7 x64 (VM).

Download AHK file from or use the Update now option:
http://marius.sucan.ro/media/files/blog ... ss-osd.ahk

Languages file must be updated.

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
burque505
Posts: 446
Joined: 22 Jan 2017, 19:37

Re: [Script] KeypressOSD - Display key press on screen

28 Nov 2017, 08:41

Hi, Marius, it's not working for Spanish for me. It does detect the change of layout, but thinks it is kbd040A (Spanish - traditional), but it is 0x40A0C0A (Spanish, Spain, international sort).
Regards,
burque505
User avatar
Drugwash
Posts: 560
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: [Script] KeypressOSD - Display key press on screen

28 Nov 2017, 10:26

Burque, have you updated the languages file manually?

Marius, regarding this languages file update: could you make it so that at start the script would check the languages file version and if not compatible it would ask to download the correct one (or the latest if it's backwards compatible)? This would avoid misunderstandings when only main script was updated and something doesn't work as advertised.

I suppose the languages file would need an extra entry or two stating min and max script version it's intended to work with, and the script would check if its current version is within those limits; if not, warn the user or - if user chose so in settings - automatically update either script, languages file or both.
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
robodesign
Posts: 349
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: [Script] KeypressOSD - Display key press on screen

28 Nov 2017, 11:19

@burque505: I tested on Windows 7, I concluded that there are only 3 keyboard layouts in existence for Spanish and all those variations of codes actually point to these three ones. I made it such that it works this way. It is all fine for you... but...

Yes, the dead keys are not working even in my Windows 7 machine. I will return with a fix soon ;-). Thank you for pointing it out.

@ Drugwash: Yes, I could do this, but for now... I have other pressing issues regarding this project ;-).... Did it work for you?

Thank you guys.

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
robodesign
Posts: 349
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: [Script] KeypressOSD - Display key press on screen

28 Nov 2017, 14:13

@burque505: I have identified the culprit... tomorrow I will have it fixed.

It's a bug affecting quite many layouts and it requires me to go through all that have dead keys... ggrrrr... again ;-)....
Last edited by robodesign on 28 Nov 2017, 14:16, edited 1 time in total.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
burque505
Posts: 446
Joined: 22 Jan 2017, 19:37

Re: [Script] KeypressOSD - Display key press on screen

28 Nov 2017, 14:14

Cool! Thanks, Marius. Looking forward to it.
Regards,
burque505
robodesign
Posts: 349
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: [Script] KeypressOSD - Display key press on screen

29 Nov 2017, 08:48

Hey, burque!

I fixed Spanish. Please test it. Use the updater. Spanish works on both systems now, for me.

v3.61 (2017-11-29)
- more fixes of silly regressions related to typing with AltGr and dead keys....

Please do not hesitate to insist on fixing the bug, if it is still there.

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
User avatar
Drugwash
Posts: 560
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: [Script] KeypressOSD - Display key press on screen

29 Nov 2017, 10:54

Testing v3.61:
20171129172739-crop.png
(5.81 KiB) Not downloaded yet


OSD now strangely displays a small portion of text that was not typed by me, more precisely the "-crop" part from the image name above. The path was copied to clipboard by means of an explorer extension ("PathCopy" by Fox Magic Software). However, 'Monitor clipboard changes' is - and has always been - disabled.

The behavior has also changed for the worse: capital letters are sometimes lowercase again at start of row and at times characters are missing from the OSD while they appear correctly in the destination field(s).

Shift+6 works correctly now.
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
burque505
Posts: 446
Joined: 22 Jan 2017, 19:37

Re: [Script] KeypressOSD - Display key press on screen

29 Nov 2017, 11:46

Hi Marius, in my brief test of Spanish on Win7 everything is working correctly! Great! Thanks.
Russian is a bit worse, but I know it's not "officially" supported ;) Shift+[1-0,-+] don't show any of the Cyrillic shift characters.
In other words, [Ё!"№;%:??*()_+] are all missing (just numbers appear), and both '/' and '\' appear as '/'.
But the letters are all fine!
Regards,
Winter
robodesign
Posts: 349
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: [Script] KeypressOSD - Display key press on screen

29 Nov 2017, 12:24

Great to hear, finally fixed that :-) .....

Now I am applying the same fix for all the keyboard layouts supported and when I am done, I will get to Russian and other cyrillic layouts... soon... soon...

Thanks a lot.

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
robodesign
Posts: 349
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: [Script] KeypressOSD - Display key press on screen

29 Nov 2017, 14:17

@Drugwash: weird.... I fixed some more bugs for typing and detection.... version now is 3.61.5. I hope it works fine.

When you press Ctrl+V, it always captures the clipboard, if it's text, and pastes it in the OSD.


Does it detect the keyboard layouts?

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
User avatar
Drugwash
Posts: 560
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: [Script] KeypressOSD - Display key press on screen

30 Nov 2017, 06:37

Yes, v3.61.5 is fine again, automatic layout detection works correctly. Thank you.

When clipboard monitoring is disabled the script shouldn't interfere with clipboard's contents. Otherwise why that misleading option?
Personally I don't want any interaction whatsoever with the clipboard, it screws up the text in the buffer.

That apart, as I said the full path was copied to the clipboard programmatically through that Explorer extension, not by means of Ctrl+V. And if the script indeed monitored the clipboard contents correctly the whole path should've been pasted in the OSD, not only that small fragment of the file name.

Unfortunately that extension doesn't work on a x64 system so if you wanted to test it you'd have to use a virtual machine with a x86 OS (98/2000/XP/7). Since Vista there is a hidden option that does the same thing: link.
(Fox Magic Software don't host that file anymore at their site so I provided an alternative download location)
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.
robodesign
Posts: 349
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: [Script] KeypressOSD - Display key press on screen

30 Nov 2017, 08:16

Great to hear detection works.

The script does not interfere with the clipboard. Only when you press Ctrl+V, if you have a text in the clipboard, it gets pasted into the OSD.... nothing else.

Current version is 3.62:
v3.62 (2017-11-30)
- much improved behavior for shift + numpad keys
- changed code regarding num/scroll/caps lock keys
- fixes/improvements for layout detection

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
robodesign
Posts: 349
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

Re: [Script] KeypressOSD - Display key press on screen

30 Nov 2017, 08:23

@ burque505:

When you tested Spanish... did you use Windows 7 in a Virtual Machine?

Thank you.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
User avatar
Drugwash
Posts: 560
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania

Re: [Script] KeypressOSD - Display key press on screen

30 Nov 2017, 09:12

robodesign wrote:[…] when you press Ctrl+V, if you have a text in the clipboard, it gets pasted into the OSD […]
In my book that's interference. What if I have a password in clipboard and it gets pasted in clear, large characters visible from a mile away when I just want to paste it in a protected field? That may be far stretched but still I don't want the script to react in any possible way to clipboard operations when that option is disabled.

Personally I'm not that paranoid but others are and sooner or later someone would've brought this subject up.
I've deleted my CloudMe account because of GDPR - the now legal base for privacy invasion and data theft.

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 14 guests