[Script] KeypressOSD - Display key press on screen

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

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

05 Dec 2017, 15:31

Well, dead keys are broken in the RO layout, numbers are displayed instead. It's been like that for many many versions. But it started beeping on them (maybe because "something" changed default sound device from Bluetooth to Integrated sound).

I would've gone through all past versions to see if there's one that somehow works with dead keys but that annoying exit jingle became irritating after a few tests so I abandoned.
Part of my AHK work can be found here.
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

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

05 Dec 2017, 16:50

@ drug wash

Have you read what I said? :-)

The support is "limited". It shows the main symbol of the dead key, just to give the user an idea what was pressed. I have it beep by default when user presses dead keys. You can turn that off in sounds settings window :-).

There are three options regarding dead keys .... You can have it insert nothing in the text field of the OSD when such a key is pressed, or insert a generic symbol.... or the actual main symbol of the key.

Nothing is broken. That's the proper behavior I intended.

I constantly use dead keys and this script and I like how it works with dead keys. I would be happy if I could find some APIs for showing the actual dead key combinations.

If you want, please help me get the dead keys support even better. Get to coding, or help me find the right APIs.

The initial script was killing the dead keys and you couldn't use them when it was running. I made it first ignore such keys and later I realized I can make it show something the user when dead keys are pressed. First step was about showing only a generic symbol, now it's more elaborate than that.

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

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

06 Dec 2017, 06:28

I have it set to show the actual symbol, not a generic symbol or nothing at all, but still it shows 2 instead of ˇ, 3 instead of ^, 4 instead of ˘ and so on. Is that the intended behavior? Maybe there are broken settings on my system, dunno. I don't use dead keys, guess that feature never worked for me or I'm too stupid to figure it out. But I just tested the thing, trying to offer feedback.

Coding is extremely hard for me right now, for a bunch of reasons. If I was comfortable I would've helped you from the very beginning, but I'm not, so for now I limit myself to testing and reporting, maybe offering ideas. Should I stop doing that?
Part of my AHK work can be found here.
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

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

06 Dec 2017, 09:26

Yes, it is behaving correctly. It shows the main symbol of the key.... As if you press it with modifiers. You know what I mean? I think it's better than not to show anything. I give the users a clue as to what key they pressed.

Don't stop testing it :-).... I know the dead keys support is not stellar,... It takes some time to get used to it, but.... I am happy with it for now. If anyone here knows how to improve it, technically, I'd be happy to learn.

I underline.... Thank you very much for your feedback and tests.

Later today I'll post a new version.

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

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

06 Dec 2017, 09:52

OK, I understand. If I ever come across any useful information I'll refer it to you.
Thanks for bearing with me.
Part of my AHK work can be found here.
burque505
Posts: 1736
Joined: 22 Jan 2017, 19:37

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

06 Dec 2017, 12:01

Hi Marius, for Spanish the latest version kills the ability type üïëöä, and ûîêôâ. I don´t mean they don't show up in the display, I mean I'm no longer to type the characters at all when the script is active. The script is now disabled, so I am able to type them in this post. By the way, the dead keys involved are both shifted - for 'ï', I type Shift+ ', i on the US keyboard (dead key for á - type accents unshifted) and for î, Shift+[, i on the US keyboard, which is '['.
Regards,
Winter
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

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

06 Dec 2017, 13:06

Hello, followers!

@ burque505. Yes, I apologize, there were some regressions yesterday. I hope the bug is fixed now. I just tested the Spanish layouts in Win 7 and Win 10 and they worked fine. I was able to use the dead keys to type special/accented chars.

If you still have this bug/problem.... please tell me. This is a major bug and must be fixed if it is still there. Please let me know.

Today's new version fixes quite a few bugs related to dead keys and adds many layouts. You can try Russian as well.

Change log:
v3.68 (2017-12-06)
- more bug fixes related to dead keys support
- removed exit jingle, as requested by drugwash
- added complete support for 3 Greek alphabet based keyboard layouts and 19 Cyrillic based keyboard layouts: Russian, Azerbaijani, Uzbek, Serbian, Ukrainian, Bulgarian, Belarusian, Kirghiz, Mongolian, Macedonian, Bashkir, Kazakh.

I have support for 105 keyboard layouts. I think I am done adding layouts. If someone here requests a particular layout, I can add more.

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

Best regards, Marius.
Last edited by robodesign on 07 Dec 2017, 13:32, edited 2 times in total.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

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

06 Dec 2017, 13:13

Drugwash wrote:OK, I understand. If I ever come across any useful information I'll refer it to you.
Thanks for bearing with me.
No worries. I am doing my best to deliver a good, free product and I appreciate any feedback. I apologize I cannot deliver more in terms of quality and support for each layout.

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
burque505
Posts: 1736
Joined: 22 Jan 2017, 19:37

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

06 Dec 2017, 13:37

Hi Marius, I can type accented characters in Spanish, but not shifted, as before. So 'ë' gets written 'é'. The umlaut/diaeresis and the circumflex both require a shift to type.
Regards,
burque505
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

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

06 Dec 2017, 14:00

Hm... that's bad... Can you provide me with additional information? please

OS and the configuration / settings of KeyPress.'

Try default settings?
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

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

06 Dec 2017, 14:12

You can also test previous versions:

http://marius.sucan.ro/media/files/blog ... -v3-65.ahk
http://marius.sucan.ro/media/files/blog ... -v3-63.ahk
http://marius.sucan.ro/media/files/blog ... -v3-61.ahk

For these you need the older languages file:
http://marius.sucan.ro/media/files/blog ... -v1-20.ini
Please rename it to keypress-osd-languages.ini

Please tell me which one dead keys work with.
Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
burque505
Posts: 1736
Joined: 22 Jan 2017, 19:37

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

06 Dec 2017, 15:55

Marius, I think we'll have to go back farther than that. I reported on Nov. 25 that it was killing dead keys, and that was 3.57, I believe.
Regards,
burque505
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

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

06 Dec 2017, 16:23

Okay, thank you very much for helping me track the bug:

Try these, please:

http://marius.sucan.ro/media/files/blog ... -v3-56.ahk
http://marius.sucan.ro/media/files/blog ... -v3-57.ahk

Please rename it to keypress-osd-languages.ini
http://marius.sucan.ro/media/files/blog ... -v1-15.ini
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

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

06 Dec 2017, 16:36

As far as I understand.... On previous pages (page 11,... 29th of November) , you said version 3.61 worked for you with Spanish. Correct me if I am wrong.

http://marius.sucan.ro/media/files/blog ... -v3-61.ahk

Please test this version again.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
burque505
Posts: 1736
Joined: 22 Jan 2017, 19:37

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

06 Dec 2017, 18:44

Yes, I see that post. What I downloaded just now from your post above is v3-61.5, I think. At any rate, I just tried all three, and the dead keys don't work on any of them consistently. Strangely enough, for v3-56, some of the dead keys would work sporadically. Maybe I did a brief test with v3-61 and didn't catch it, but I'm really not sure.

It has to be related to the Shift key. Look at my post from December 4 - there the top row shift stuff all worked, in the latest version it no longer does - Shift+3, Shift+- and Shift++ are wrong. Unshifted the row is fine - º1234567890'¡ are all correct.
Regards,
burque505
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

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

07 Dec 2017, 04:13

Hmm.... I also tested the script on my laptop. couldnt reproduce the bugs you mention. :(

Can we get into contact over IM? to communicate faster and easier... such that I can get nearer to fixing this bug.

Did you test AltGr ? does that work? AltGr+4 is a dead key for Spanish Traditional.

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

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

07 Dec 2017, 06:47

Hello!

New version:

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

Change log:

v3.68.5 (2017-12-07)
- more bug fixes related to dead keys support

I discovered more bugs related to dead keys and I hope they work now for you, burque505.

@burque505: Please test this one. Make sure you have the latest language definitions file. Thank you.

Best regards, Marius.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

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

07 Dec 2017, 07:06

Hey burque, here's the original v3.61 if you need to test it:
KeypressOSD3.61wLangs.7z
(46.13 KiB) Downloaded 63 times
(I have no languages ini for 3.61, I attached the ones for 3.60 and 3.61.5, please rename as needed)
Part of my AHK work can be found here.
robodesign
Posts: 934
Joined: 30 Sep 2017, 03:59
Location: Romania
Contact:

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

07 Dec 2017, 07:25

Thank you, drugwash;

Do the dead keys work for you? on the Spanish layouts...

Today's fix [version 3.68.5] fixes the way it unbinds dead keys and then rebinds them as known dead keys.

http://marius.sucan.ro/media/files/blog ... ss-osd.ahk

I am fairly certain that the new version is going to fix the problem for burque505... .
Last edited by robodesign on 07 Dec 2017, 07:50, edited 1 time in total.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
User avatar
Drugwash
Posts: 850
Joined: 29 May 2014, 21:07
Location: Ploieşti, Romania
Contact:

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

07 Dec 2017, 07:46

Situation is a bit complicated for me. I only have the RO (legacy, if you will) layout on my XP - not any other. Right now I'm reading some reports/complaints on the web stating that any keyboad layout that has dead keys and is set as default will lose the dead keys property upon reboot. Reports include Win7 and 8.x so I can only assume XP is one of the first OS versions that exhibits such behavior because no matter what I do I can't get dead keys working here in any application. Therefore I cannot vouch for this script's accuracy in regard to dead keys.

See if this may be of any help: link. The use of a low level keyboard hook and some calls to ToUnicode() and/or other API may help in achieving the desired goal.

Oh and you didn't have to completely remove the exit jingle - just make an option in the Sounds panel to have it turned on or off per user preference. I know it may be of use sometimes but other times it may be annoying so such an option would fit anyone's preferences.
Last edited by Drugwash on 07 Dec 2017, 07:51, edited 1 time in total.
Part of my AHK work can be found here.

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 65 guests