[Script] KeypressOSD - Display key press on screen

Post your working scripts, libraries and tools
rommmcek
Posts: 357
Joined: 15 Aug 2014, 15:18

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

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 606 times
robodesign
Posts: 357
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

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

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.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
robodesign
Posts: 357
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

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

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.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
rommmcek
Posts: 357
Joined: 15 Aug 2014, 15:18

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

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
rommmcek
Posts: 357
Joined: 15 Aug 2014, 15:18

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

01 May 2018, 09:15

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

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

robodesign
Posts: 357
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

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

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.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
rommmcek
Posts: 357
Joined: 15 Aug 2014, 15:18

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

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] [Download] 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
robodesign
Posts: 357
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

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

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.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
robodesign
Posts: 357
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

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

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.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
robodesign
Posts: 357
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

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

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.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.
robodesign
Posts: 357
Joined: 30 Sep 2017, 03:59
Facebook: marius.sucan
GitHub: mariussucan
Location: Romania
Contact:

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

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.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
My home page.

Return to “Scripts and Functions”

Who is online

Users browsing this forum: Xtra and 21 guests