Recent

Author Topic: OnKeyUp error sound  (Read 1800 times)

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2083
  • Fifty shades of code.
    • Delphi & FreePascal
Re: OnKeyUp error sound
« Reply #15 on: February 04, 2023, 10:20:54 pm »
That event is just too late for it.
"Prevent" you can only in OnKeyDown or OnKeyPress (KeyPreview must be True)
Wrong.
Thaddy, please show me my mistake, I really want to learn from you. Current solution is with exact what I wrote, so I am unhappy  :-\

Ctrl doesn't raise sounds, but Ctrl + letters does. Ctrl is Strg on German keyboards.
Must be a local phenoma, here I can hit CTRL with whatever = nothing happen, no sound no nothing and as long as I can remember it never did.
I just created a fresh empty LCL app and hit like a monkey on keys.... no success to make some noise beside my keyboard is doing *click click click*  :D
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

dseligo

  • Hero Member
  • *****
  • Posts: 1222
Re: OnKeyUp error sound
« Reply #16 on: February 05, 2023, 03:43:41 am »
Must be a local phenoma, here I can hit CTRL with whatever = nothing happen, no sound no nothing and as long as I can remember it never did.

Did you try with test project I posted? It depends on what control you have focus. I got sound when in TEdit, TMemo (not all combinations), TComboBox, TMaskEdit, TDBEdit, TDBLookupComboBox, e.g.
I don't get sound when I have focus on TButton, TBitBtn, TRadioGroup, TDateTimePicker, ...

I guess it depends on Windows widgetset.

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2083
  • Fifty shades of code.
    • Delphi & FreePascal
Re: OnKeyUp error sound
« Reply #17 on: February 05, 2023, 11:37:29 pm »
@dseligo
Ahh now I do understand and confirm you, sorry my bad!!
Yes, on whatever kind of edit you will hear a sound when pressing CTRL + Letter.

@Thaddy, where are you?
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

 

TinyPortal © 2005-2018