[all-commits] [llvm/llvm-project] 77347d: [llvm-rc] Allow ALT on non-virtkey accelerators (#...
Martin Storsjö via All-commits
all-commits at lists.llvm.org
Tue Jun 10 00:23:41 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 77347d6513de6a6f5dee8ade76e0a0ad1552c12b
https://github.com/llvm/llvm-project/commit/77347d6513de6a6f5dee8ade76e0a0ad1552c12b
Author: Martin Storsjö <martin at martin.st>
Date: 2025-06-10 (Tue, 10 Jun 2025)
Changed paths:
R llvm/test/tools/llvm-rc/Inputs/tag-accelerators-ascii-alt.rc
M llvm/test/tools/llvm-rc/Inputs/tag-accelerators.rc
M llvm/test/tools/llvm-rc/tag-accelerators.test
M llvm/tools/llvm-rc/ResourceFileWriter.cpp
Log Message:
-----------
[llvm-rc] Allow ALT on non-virtkey accelerators (#143374)
While
https://learn.microsoft.com/en-us/windows/win32/menurc/accelerators-resource
specifies that ALT only applies to virtkeys, this doesn't seem to be the
case in reality.
https://learn.microsoft.com/en-us/windows/win32/menurc/using-keyboard-accelerators
contains an example that uses this combination:
"B", ID_ACCEL5, ALT ; ALT_SHIFT+B
Also Microsoft also includes such cases in their repo of test cases:
https://github.com/microsoft/Windows-classic-samples/blob/263dd514ad215d0a40d1ec44b4df84b30ec11dcf/Samples/Win7Samples/begin/sdkdiff/sdkdiff.rc#L161-L164
Also MS rc.exe doesn't warn/error about this. However if applying SHIFT
or CONTROL on a non-virtkey accelerator, MS rc.exe does produce this
warning:
warning RC4203 : SHIFT or CONTROL used without VIRTKEY
Hence, keep the checks for SHIFT and CONTROL, but remove the checks for
ALT, which seems to have been incorrect.
This fixes one aspect of
https://github.com/llvm/llvm-project/issues/143157.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list