From 3a5b2b9430aacfea00649f2056a727e9d5642823 Mon Sep 17 00:00:00 2001 From: Martijn Laan <1092369+martijnlaan@users.noreply.github.com> Date: Fri, 28 Jun 2024 09:15:53 +0200 Subject: [PATCH] Prefer Alt+Left/Right as the main back/forward shortcuts because not all keyboard layouts have VK_OEM_MINUS, for example French layout hasn't. --- Projects/Src/CompForm.pas | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Projects/Src/CompForm.pas b/Projects/Src/CompForm.pas index adf27efd2..98884cd66 100644 --- a/Projects/Src/CompForm.pas +++ b/Projects/Src/CompForm.pas @@ -5429,20 +5429,19 @@ procedure TCompileForm.UpdateKeyMapping; { The Nav buttons have no corresponding menu item and also no ShortCut property so they need special handling } + FBackNavButtonShortCut := ShortCut(VK_LEFT, [ssAlt]); + FForwardNavButtonShortCut := ShortCut(VK_RIGHT, [ssAlt]); + case FOptions.KeyMappingType of kmtDelphi: begin - FBackNavButtonShortCut := ShortCut(VK_LEFT, [ssAlt]); FBackNavButtonShortCut2 := 0; - FForwardNavButtonShortCut := ShortCut(VK_RIGHT, [ssAlt]); FForwardNavButtonShortCut2 := 0; end; kmtVisualStudio: begin - FBackNavButtonShortCut := ShortCut(VK_OEM_MINUS, [ssCtrl]); - FBackNavButtonShortCut2 := ShortCut(VK_LEFT, [ssAlt]); - FForwardNavButtonShortCut := ShortCut(VK_OEM_MINUS, [ssCtrl, ssShift]); - FForwardNavButtonShortCut2 := ShortCut(VK_RIGHT, [ssAlt]); + FBackNavButtonShortCut2 := ShortCut(VK_OEM_MINUS, [ssCtrl]); + FForwardNavButtonShortCut2 := ShortCut(VK_OEM_MINUS, [ssCtrl, ssShift]); end; else raise Exception.Create('Unknown FOptions.KeyMappingType');