[Script] KeypressOSD - Display key press on screen

Post your working scripts, libraries and tools for AHK v1.1 and older
SashaChernykh
Posts: 32
Joined: 01 Sep 2016, 04:04
Contact:

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

22 Jan 2017, 02:40

@tmplinshi, may you add multiple pressing of modifier keys? For example, Ctrl+Ctrl, Shift+Shift+Shift+Shift+Shift (Sticky keys). Thanks.
tmplinshi
Posts: 1604
Joined: 01 Oct 2013, 14:57

22 Jan 2017, 03:55

v2.09 (2017-01-22) - Added ShowModifierKeyCount option

Ok, I added ShowModifierKeyCount option (default is false). For example double clicking Ctrl key will display as Ctrl ( * 2 ), same to sticky pressing. But I think I should add an ShowStickyModifierKeyCount option. working on it..
tmplinshi
Posts: 1604
Joined: 01 Oct 2013, 14:57

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

22 Jan 2017, 10:10

v2.10 (2017-01-22) - Added ShowStickyModKeyCount option

:arrow: Source
Last edited by tmplinshi on 24 Feb 2017, 09:03, edited 2 times in total.
SashaChernykh
Posts: 32
Joined: 01 Sep 2016, 04:04
Contact:

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

23 Feb 2017, 11:29

@tmplinshi, may you add behavior, if user send same hotkey for sticky modifier keys?

Now if ShowStickyModKeyCount = true for me, Ctrl+V, V display as Ctrl+V.

First input:

Code: Select all

Send, {LControl Down}
Send, {v}
Send, {LControl Up}
Send, {LControl Down}
Send, {v}
Send, {LControl Up}
Second input:

Code: Select all

Send, {LControl Down}
Send, {v}
Send, {v}
Send, {LControl Up}
It would be nice, if there were differences.

Thanks.
tmplinshi
Posts: 1604
Joined: 01 Oct 2013, 14:57

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

24 Feb 2017, 09:04

@SashaChernykh Done.

Code: Select all

v2.20 (2017-02-24) - Added displaying continuous-pressed combination keys.
                     e.g.: With CTRL key held down, pressing K and U continuously will shown as "Ctrl + k, u"
:arrow: Source
tmplinshi
Posts: 1604
Joined: 01 Oct 2013, 14:57

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

24 Feb 2017, 09:13

v2.21 (2017-02-24) - Fixed LWin/RWin not poping up start menu

:arrow: Source
SashaChernykh
Posts: 32
Joined: 01 Sep 2016, 04:04
Contact:

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

24 Feb 2017, 23:50

@tmplinshi, now KeypressOSD nice work, if I press Ctrl+V, V, but don't displayed, if I press, for example, Ctrl+V, V, V, V, V.

Thanks for KeypressOSD!
tmplinshi
Posts: 1604
Joined: 01 Oct 2013, 14:57

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

25 Feb 2017, 00:33

Code: Select all

v2.22 (2017-02-25) - Now pressing same combination keys continuously more than 2 times,
                     for example press Ctrl+V 3 times, will displayed as "Ctrl + v (3)"
:arrow: Source
User avatar
missclickman
Posts: 4
Joined: 03 Feb 2017, 11:59

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

02 Mar 2017, 03:57

hi, first i want to say its an anwsome script! ;)
But i have a little problem with my french client, that dont display following keystroke : éèçàù< (that normal keystroke, -for exemple if i press key "2" without pressing shift its "é"- in azerty keyboard layout)
Dont read this, nothing interesting here, ____________________________Here either
tmplinshi
Posts: 1604
Joined: 01 Oct 2013, 14:57

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

02 Mar 2017, 05:06

Hi missclickman,

I just installed the French language with azerty keyboard layout, works fine for me. When I press key "2", the script displays "é".
User avatar
missclickman
Posts: 4
Joined: 03 Feb 2017, 11:59

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

02 Mar 2017, 09:59

tmplinshi wrote:Hi missclickman,

I just installed the French language with azerty keyboard layout, works fine for me. When I press key "2", the script displays "é".
OMG you are so quick Oo
Well i tried to add those key éèçàù in "otherkey" section but it was a problem when i switch my keyboard in other language (i get an error : this hotkey is invalid = ~* )
thank per advance
whish you a nice day
Dont read this, nothing interesting here, ____________________________Here either
Danielsan73
Posts: 18
Joined: 07 Nov 2014, 10:20

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

15 Mar 2017, 14:18

i got italian Keyboard Layout on Windows 10 and got this erron on script start:
Image
after it, working for normal keys but not recognize Tab Crtl Alt and Mouse or other special keystrokes.
Can u help?
Oh forgot to say when i switch to Eng Lyout and reload all working fine.
Ty
Danielsan73
Posts: 18
Joined: 07 Nov 2014, 10:20

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

04 Apr 2017, 03:24

Danielsan73 wrote:i got italian Keyboard Layout on Windows 10 and got this erron on script start:
Image
after it, working for normal keys but not recognize Tab Crtl Alt and Mouse or other special keystrokes.
Can u help?
Oh forgot to say when i switch to Eng Lyout and reload all working fine.
Ty
ok got fix it:

Code: Select all

 
CreateHotkey() {
    Loop, 64
        Hotkey, % "~*" Chr(A_Index + 31), OnKeyPressed
    Loop, 29
        Hotkey, % "~*" Chr(A_Index + 96), OnKeyPressed
       
    Loop, 24 ; F1-F24
        Hotkey, % "~*F" A_Index, OnKeyPressed
 
    Loop, 10 ; Numpad0 - Numpad9
        Hotkey, % "~*Numpad" A_Index - 1, OnKeyPressed
Just skipped in loop the "`" key ... does not exist in italian Layout.
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

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

05 Jul 2017, 07:14

tmplinshi wrote:This script is based on HotShow.ahk by RaptorX (http://www.autohotkey.com/board/topic/5 ... tutorials/).
(As always, the download links at RaptorX's thread in the archived forum are broken) :yawn:
Has anyone those png-images (don't know it those are special ones) available?
The code itself has been posted there :thumbup:

Thx 4 listening :)
PS. does anyone know where in his YouTube videos RaptorX has used that script/tool?
User avatar
Delta Pythagorean
Posts: 627
Joined: 13 Feb 2017, 13:44
Location: Somewhere in the US
Contact:

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

05 Jul 2017, 16:12

How about customization on where the OSD displays?

[AHK]......: v2.0.12 | 64-bit
[OS].......: Windows 11 | 23H2 (OS Build: 22621.3296)
[GITHUB]...: github.com/DelPyth
[PAYPAL]...: paypal.me/DelPyth
[DISCORD]..: tophatcat

denyerec
Posts: 4
Joined: 25 Jul 2017, 12:26

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

25 Jul 2017, 14:45

I don't know if I'm being thick, but when I paste this into my AHK script if it's at the bottom then it doesn't work, and if it's at the top then it stops all my other AHK binds from working.

Here's my current script: https://gist.github.com/Denyerec/5e5923 ... xt-L65-L66

(You'll notice the initialisation is currently commented out)

Any advice gratefully received as this would be such a useful tool when streaming tutorials!

(Apologies for the Guest post, if a mod can remove it that'd be great!)
User avatar
Nextron
Posts: 1391
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win10 AHK: Unicode x32

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

25 Jul 2017, 15:29

Why do some lines in my script never execute?

Any lines you want to execute immediately when the script starts should appear at the top of the script, prior to the first hotkey, hotstring, or Return. For details, see auto-execute section.
denyerec
Posts: 4
Joined: 25 Jul 2017, 12:26

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

25 Jul 2017, 17:15

Yes I saw that, but I don't understand beyond this which lines I *should* have at the top of the script in this case :/
denyerec
Posts: 4
Joined: 25 Jul 2017, 12:26

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

25 Jul 2017, 17:16

Ahh hang on. I think I'm getting somewhere!

Wait - no, false alarm, I have no idea what I'm doing. I've moved the OSD script into a different file to call it in, but I don't understand what it's doing well enough to know why it blocks my normal binds :/

So I understand from the manual that the first bind stops the autoexecute - but if that was the thing that's stopping my binds, then the first bind would stop all subsequent ones... so that doesn't make any sense to me. Something about this script is stopping the rest of my script from working and I have no idea what.

I've updated the gist: https://gist.github.com/Denyerec/5e5923 ... e1-txt-L25


The included file contains the exact paste from this thread's script. I don't understand how I am to shuffle things around in the config to make the other binds work, any guidance appreciated.
guest3456
Posts: 3454
Joined: 09 Oct 2013, 10:31

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

25 Jul 2017, 21:16

Why even bother including this in another script?

Why not just run it separately?


Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: gwarble and 119 guests