Skip to content

Commit

Permalink
Menubar alt keybinds, dont listen to AltGr
Browse files Browse the repository at this point in the history
  • Loading branch information
ollydev committed Oct 15, 2023
1 parent 25af4be commit 4d1d106
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/components/simba.component_menubar.pas
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ procedure TSimbaMainMenuBar.KeyDown(var Key: Word; Shift: TShiftState);
begin
if Focused then
begin
if (Key = VK_MENU) then
if (Key = VK_MENU) and (not (ssAltGr in Shift)) then
begin
Key := VK_RIGHT;
end;
Expand Down
2 changes: 1 addition & 1 deletion Source/forms/simba.main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ procedure TSimbaForm.FormDestroy(Sender: TObject);

procedure TSimbaForm.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
if (Key = VK_MENU) and MenuBar.CanSetFocus() then
if (Key = VK_MENU) and (not (ssAltGr in Shift)) and MenuBar.CanSetFocus() then
MenuBar.SetFocus();
end;

Expand Down

0 comments on commit 4d1d106

Please sign in to comment.