Disable beep on arrow-down in Virtual TreeView on macOS M1, but keep navigation lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- Sanem · 2025-04-07 13:08 Hello everyone,  I'm using Lazarus on macOS M1 with the minimal Virtual TreeView test project. Whenever I press the arrow-down key to move to the next sibling, I hear a beep. I want to disable just that beep while keeping normal tree navigation intact. I've tried:  1. Setting `Message.Result := 1` in `WMKeyDown`, but it didn't stop the beep.  2. Overriding the `OnKeyDown` event and setting `Key := 0` removes the beep and stops the tree from navigating. Neither of these solutions worked for me on macOS M1 in the minimal Virtual TreeView test project. Does anyone know a method to cleanly remove the beep sound but keep the arrow key navigation? Any help would be much appreciated.  Thank you! ---------------------------------------------------------------------- Hansaplast · 2025-04-08 14:11 I do not have a good answer for you, but maybe you can try setting onBeep to nil? Not sure if that will do any good though. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i OnBeep := nil; ---------------------------------------------------------------------- Martin_fr · 2025-04-08 18:17 See also https://forum.lazarus.freepascal.org/index.php/topic,68571.ms g530318.html#msg530318 ---------------------------------------------------------------------- Sanem · 2025-04-09 06:53 Quote from: Martin_fr on April 08, 2025, 08:17:33 pmSee also https://f orum.lazarus.freepascal.org/index.php/topic,68571.msg530318.html#msg53 0318 Thanks, I saw this thread but none of the approaches mentioned here worked for me. ---------------------------------------------------------------------- Sanem · 2025-04-09 06:56 Quote from: Hansaplast on April 08, 2025, 04:11:47 pmI do not have a good answer for you, but maybe you can try setting onBeep to nil? Not sure if that will do any good though. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i OnBeep := nil; Thanks, I will try this as soon as I can, but I was searching for the root cause of the issue and how I can alter this behavior by changing or overriding some details about the virtual tree component. Any suggestions? I tried 2 approaches but they did not solve the issue. ---------------------------------------------------------------------- Sanem · 2025-04-10 10:10 I resolved the issue by overriding the CNKeyDown event in TBaseVirtualTree using the approach below. This method retains the default navigation behavior and effectively prevents the beep sound when using the arrow keys on macOS. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i    protected    {$IFDEF DARWIN}    procedure CNKeyDown(var Message: TLMKeyDown); message CN_KEYDOWN;    {$ENDIF}                {$IFDEF DARWIN} procedure TBaseVirtualTree.CNKeyDown(var Message: TLMKeyDown);begin  inherited;  WMKeyDown(Message);  Message.Result:=1;end; {$ENDIF}