Skip to content

Commit

Permalink
Merge branch 'main' into Fairview
Browse files Browse the repository at this point in the history
  • Loading branch information
MatejGolian committed Oct 19, 2024
2 parents f13d8f4 + 96207f0 commit 11262e3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Hopefully fixed a rare bug in AccessibleMenu

## [0.5.0] - 2024-10-18

### Added
Expand Down
8 changes: 7 additions & 1 deletion Lib/AccessibleMenu.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ Class AccessibleMenu {
DisabledString := "unavailable"
LeavingMenuString := "leaving menu"
SubmenuString := "submenu"
Static Translations := AccessibleMenu.SetupTranslations()
Static Translations := Map()

Static __New() {
AccessibleMenu.Translations := AccessibleMenu.SetupTranslations()
}

Add(MenuItemName, CallbackOrSubmenu := "", Options := "") {
MenuItemName := Trim(MenuItemName)
Expand Down Expand Up @@ -242,9 +246,11 @@ Class AccessibleMenu {
Return
}
Else {
SingleKey := ""
If SubStr(KeyCombo, 1, 1) = "+" And StrLen(SubStr(KeyCombo, 2)) = 1
SingleKey := SubStr(KeyCombo, 2)
Else
If AccessibleMenu.CurrentMenu Is AccessibleMenu
SingleKey := AccessibleMenu.CurrentMenu.KeyWaitSingle()
If SubStr(SingleKey, 1, 6) = "Numpad"
SingleKey := SubStr(SingleKey, 7)
Expand Down

0 comments on commit 11262e3

Please sign in to comment.