[Script] KeypressOSD - Display key press on screen

Post a reply

Confirmation code
Enter the code exactly as it appears. All letters are case insensitive.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: [Script] KeypressOSD - Display key press on screen

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

Post by robodesign » 04 Jun 2018, 05:55

Hey, guys!

v4.32.2 (2018-06-01)
- bug fixes regarding mouse ripples; they should not be clickable anymore
- other minor fixes

v4.32.1 (2018-05-23)
- bug fixes regarding Emojis and the auto-replace feature
- now it should no longer stall if the host application stalls

All files updated:

On GitHub: https://github.com/marius-sucan/KeyPress-OSD

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

ZIP Package compiled [x64 / x32], includes AHK_H and sources:
http://marius.sucan.ro/media/files/blog ... mpiled.zip

Please let me know if you have any issues with it. Suggestions are welcomed.

Best regards, Marius.

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

Post by robodesign » 15 May 2018, 16:20

Holla, people!
Another quick update.

v4.32 (2018-05-15)
- fixed issues related to Caret Halo, Mouse Visual Clicks [the blocks and ripples]... Now, right-clicks should work in MS Word.... Previously, these features, when activated, were interfering and it was impossible to invoke the context menu in MS Word by right-clicking.
- and other fixes.

All files were updated. Binaries. Github.

Recently, I've been only doing bug hunting and fixes.

Best regards, Marius.

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

Post by robodesign » 04 May 2018, 15:51

Hello! Quick update...

Edit.

v4.31.8 (2018-05-12)
- [important bug fix] fixed a bug that caused crashes on some systems when Mouse Ripples were activated

v4.31.7 (2018-05-09)
- removed option to ignore specific keys; it was limited only to typing keys; therefore, users were not able to ignore keys such as Esc or F1; this feature created confusion
- fixed a glitch; xbutton 1 and 2 were not considered as mouse buttons; they were displayied in the OSD even if "Show mouse buttons" was deactivated.
.................

(2018-05-04)
Today I released version 4.31.6 of KeyPress OSD. It features many fixes, and important ones. There was a regression that caused issues with the global shortcuts, which rendered them unusable.

Best regards, Marius.

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

Post by robodesign » 03 May 2018, 04:32

Hello!

Thank you for the demo. It is interesting. However, I am not sure this issue [the caret width] is 'that' important. I personally believe that the efforts one needs to put into fixing the caret width issue are too big compared to the benefits it yields. And, once I would make this change, unforseen things will occur, that is, various bugs / regressions.

Just to give you a hint, while testing your script, for no reason, it switches the keyboard layout . I do not know why this happens. It happens only sometimes. This weird behavior occurs even when no other script is running.

However, as I previously said... feel free to make the modifications to my code, and if you get something working, I will do various tests and even try to help with bug fixes... such that we can merge the changes to the main branch. But, please keep in mind, this will happen only when I find there is no regression compared to the current version.

Best regards, Marius.

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

Post by rommmcek » 01 May 2018, 23:51

This is disappointing.
O.k. Rtf is a new field (for me too), but just don't get it, you gave up before your started.
Made a quick demo adaptation of Type Enlarger uploaded on page 20 of this thread.
- run the script
- type some text
- navigate left and right (do not go beyond text displayed in OSD)
- does not support editing inside the text string, but you can hit End at any time
- does not support special characters (they had to be replaced with appropriate Rtf control words just the way the caret is), but supports dead characters

- Esc, Up and Down: clear OSD
- #Esc: Exit
- ^c: copy marked text and display it in the OSD
- ^Ins: copy the word or part of it left form caret
- Left: navigate left
- Right: navigate right
- End: go to the end of the string (Home not supported)

Edit: Just figured it out, my "magic" line could be still more condensed:

Code: [Select all]GeSHi © Codebox Plus

Gui, 2:Show, % (!sr?"":"x" KbdX " y" KbdY sr:="") " w" KbdW " h" KbdH, Virtual keyboard ; for UR6
Gui, 3:Show, % !sl?"":"x" 380 " y" 360 sl:="", Preview layout: %Layout% ; for 1.30
Attachments
Rtf Enlarger.zip
(20.08 KiB) Downloaded 14 times

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

Post by robodesign » 01 May 2018, 09:45

Hello!

I looked into this, Class RichEdit and... all I can say, it is beyond my level of skills. However, you can try to implement this into KeyPress OSD. Download latest version, ... and modify it. If you achieve something good, post it here and I will merge it into the main version, if it passes all my tests.

Best regards, Marius.

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

Post by rommmcek » 01 May 2018, 09:15

This is way simpler as before and looks pretty promising...

Code: [Select all] [Expand]GeSHi © Codebox Plus

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

Post by rommmcek » 01 May 2018, 00:03

And.... At preferences, the user would actually select the substitute font for the missing characters in the main font. Would this be possible? To define the substitute font in some way....
For Edit Control, I think not, but for Rtf sure you can.
Rtf is demanding, but I made simple example to show, in your case it's not over complicated. Search for "rtf control words" too.
For include file and complex example look here.
Attachments
Rtf Control and iCaret with zero space.zip
(2.04 KiB) Downloaded 14 times

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

Post by robodesign » 30 Apr 2018, 17:28

At rommmcek.

I just had an idea now....

I could have a font just for the possible caret shapes. It wouldn't include any other character.

And.... At preferences, the user would actually select the substitute font for the missing characters in the main font. Would this be possible? To define the substitute font in some way....

Best regards, Marius.

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

Post by robodesign » 30 Apr 2018, 02:52

Hey!

Thanks a lot for the instructions.

It is very interesting, I like the idea, but this applies only when using this font, you created... It would great if the caret would use its own font - within a RichEdit control. Do you have any experience with such controls?

As a side note, ... it is not a good idea to use an apostrophe or any other character commonly used in writing, because KeyPress OSD gets lost and no longer knows which one is the actual caret and which one is the typed character.

Best regards, Marius.

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

Post by rommmcek » 30 Apr 2018, 00:40

I'm using just basic features and no bugs appeared so far.
- you might set a list of testing points

I was in the hurry and forgot to give instructions.
- install the font iCaret.ttf
- replace , Lola := "│" with , Lola := "'"
- run keypress-OSD.ahk
- choose Typeface font in "OSD appearance" menu
- type something - don't use apostrophe ( ' ) - and move the caret back and forth
Attachments
Caret With Zero Width.gif
Caret With Zero Width.gif (83.35 KiB) Viewed 599 times

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

Post by robodesign » 29 Apr 2018, 04:30

Hey, thanks for the feedback!

Yes, a rich-edit would be the optimal solution, indeed. I could then implement support for bold, italic and underline as well. However, it would get utterly complicated, and beyond my skills...

You said 'all main features seem to work fine'. Have you found any bugs? Please let me know, thank you .

PS. Today I released a new version with minor bug fixes.... v4.31.3. However, it also includes a major bug fix for those using this script on AHK_L.

Best regards, Marius.

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

Post by rommmcek » 29 Apr 2018, 03:25

- Very good work, appealing design, awesome presentation clip, all main features seem to work fine.

- The caret is a bit clumsy. There was an attempt by Drugwash. Too bad it wasn't developed further. My suggestion: Why not create new font for caret having zero width? Here is my attempt (just edited apostrophe, since it is the first time doing this). Altogether not very useful for Edit Control - it's not imaginable to alter all fonts user can choose. But if you'd use RichEdit Control, you could make caret even blink...
Attachments
iCaret.zip
(1.05 KiB) Downloaded 16 times

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

Post by robodesign » 24 Apr 2018, 17:12

@Burque505. Please test the dead keys support. I simplified the code and I hope it's still working. In particular, see if you get the resulted chars (those with accents).

Thank you. All the best.

....... Edit.......

Recent change log:

v4.31.2.1 (2018-04-27)
- fixed a bug that prevented it sometimes from working on slow PCs when the option to not restart on keyboard layout changes was activated;
- other bug fixes;

v4.31.1 (2018-04-25)
- [new] on newer versions of Windows [7, 8 or 10], KeyPress OSD sets itself at start-up in admin mode, using the Task Scheduler; the user should not get any prompts from UAC at every system boot;
- bug fixes related to Windows XP and the mouse features;

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

Post by robodesign » 24 Apr 2018, 14:28

Hello!

The script is now feature complete. I personally no longer have any new features planned, But, I am open to feature requests and bug reports.

Recent change log:

v4.31 (2018-04-24)
- removed integration of the ACC viewer and UIA Interface libraries [the feature was introduced in v4.18.1]
- removed integration with Capture2Text, because it was unreliably functioning; this feature was introduced in v3.01;
- changes to the main menu [the tray menu]
- underlying changes to dead keys related thread; it no longer uses SendMessage to communicate with the main thread, but ahkAssign variable [from AHK_H]
- various bug fixes

v4.30.8 (2018-04-22)
- more bug fixes; important bug fixes as well
- removed option to offer audio-visual feedback on mouse cursor changes [it was introduced in v4.28.3], because it was not reliably working

v4.30.7 (2018-04-19)
- more bug fixes
- more changes to the mouse keys script; drag 'n drop is now possible with 'locked' click... and hopefully, now, mouse movements do not get stuck anymore

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

ZIP Package compiled [x64 / x32], includes AHK_H and sources:
http://marius.sucan.ro/media/files/blog ... mpiled.zip


All files updated. Github and compiled editions.

Best regards, Marius.

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

Post by robodesign » 17 Apr 2018, 17:54

Oh, that's lovely to hear! Thanks for the feedback.

Edit: I released v4.30.6 with various bug fixes. All files updated, including the ZIP files, binaries and Github.

Best regards, Marius.

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

Post by burque505 » 17 Apr 2018, 17:18

Hi Marius,
I'll try using Sublime Text, see if that works (I'm sure it will).
Zero issues with AHK_H, as far as I can tell. Everything just worked. Bravo!
Regards,
burque505

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

Post by robodesign » 17 Apr 2018, 15:46

Hey, burque!

Many thanks for your feedback.

The script, maybe, is too large. I have no idea. I never used that.

You can open the file with something like Notepad++ or Sublime Editor [this is what I use], go to the end of the file, and you can see the lines with 'deleteME' and that is all. Should be easy.

No issues at all with AHK_H? Layout switching works without restarts? Dead keys as well?

Best regards, Marius.

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

Post by burque505 » 17 Apr 2018, 15:25

Hi Marius, works fine with AHK_H 1.1.28.00 (Win7 64-bit), but when I switched back to AHK_L and tried to edit it (per your tip) with Scite4AutoHokey, it crashes Scite.
Scite's still working fine with all the rest of my scripts.
Here's a screenshot:
Capture.PNG
Capture.PNG (83.14 KiB) Viewed 648 times

Regards,
burque505

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

Post by robodesign » 17 Apr 2018, 12:22

Hello, guys!

I am proud to announce.... KeyPress OSD no longer needs to restart on keyboard layout changes.

Change log:

v4.30.5 (2018-04-17)
- [new] eliminated the need for restarts on keyboard layout changes; at Keyboard preferences you can enable/disable this; enabled by default
- bug fixes regarding mouse keys, and others

Please, people [burque505 and others]... test this version and let me know if it works or not.

I maintained compatibility with AHK_L, but it will restart on layout changes. [reminder: remove this line for AHK_L: ahkThread_Free(deleteME) ].


On GitHub: https://github.com/marius-sucan/KeyPress-OSD

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

PS. The binary files were not yet updated. I need more feedback.

Best regards, Marius.

Top