Skip to content

Commit

Permalink
Fix hex keys5 (#3140)
Browse files Browse the repository at this point in the history
* [v3 darwin] change hex values for arrow keys pulled from "Key Codes" app

* Update changelog

---------

Co-authored-by: Josh <[email protected]>
  • Loading branch information
leaanthony and jaybeecave authored Dec 17, 2023
1 parent 371e575 commit 2b3c96a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 21 deletions.
20 changes: 7 additions & 13 deletions mkdocs-website/docs/en/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- [darwin] add Event ApplicationShouldHandleReopen to be able to handle dock icon
click by @5aaee9 in [#2991](https://github.com/wailsapp/wails/pull/2991)
- [darwin] add getPrimaryScreen/getScreens to impl by @tmclane in
[#2618](https://github.com/wailsapp/wails/pull/2618)
- [darwin] add Event ApplicationShouldHandleReopen to be able to handle dock icon click by @5aaee9 in [#2991](https://github.com/wailsapp/wails/pull/2991)
- [darwin] add getPrimaryScreen/getScreens to impl by @tmclane in [#2618](https://github.com/wailsapp/wails/pull/2618)
- [linux] add onKeyPress logic to convert linux keypress into an accelerator @[Atterpac](https://github.com/Atterpac) in[#3022](https://github.com/wailsapp/wails/pull/3022])

### Fixed

- Fixed Doctor apt package verify by [Atterpac](https://github.com/Atterpac) in
[#2972](https://github.com/wailsapp/wails/pull/2972).
- Fixed application frozen when quit (Darwin) by @5aaee9 in
[#2982](https://github.com/wailsapp/wails/pull/2982)
- Fixed background colours of examples on Windows by
[mmgvh](https://github.com/mmghv) in
[#2750](https://github.com/wailsapp/wails/pull/2750).
- Fixed default context menus by [mmgvh](https://github.com/mmghv) in
[#2753](https://github.com/wailsapp/wails/pull/2753).
- Fixed Doctor apt package verify by [Atterpac](https://github.com/Atterpac) in [#2972](https://github.com/wailsapp/wails/pull/2972).
- Fixed application frozen when quit (Darwin) by @5aaee9 in [#2982](https://github.com/wailsapp/wails/pull/2982)
- Fixed background colours of examples on Windows by [mmgvh](https://github.com/mmghv) in [#2750](https://github.com/wailsapp/wails/pull/2750).
- Fixed default context menus by [mmgvh](https://github.com/mmghv) in [#2753](https://github.com/wailsapp/wails/pull/2753).
- Fixed hex values for arrow keys on Darwin by [jaybeecave](https://github.com/jaybeecave) in [#3052](https://github.com/wailsapp/wails/pull/3052).

### Changed

Expand Down
8 changes: 4 additions & 4 deletions v2/internal/frontend/desktop/darwin/WailsMenu.m
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,16 @@ - (NSString*) accel :(NSString*)key {
return unicode(0x001b);
}
if( [key isEqualToString:@"left"] ) {
return unicode(0x001c);
return unicode(0xf702);
}
if( [key isEqualToString:@"right"] ) {
return unicode(0x001d);
return unicode(0xf703);
}
if( [key isEqualToString:@"up"] ) {
return unicode(0x001e);
return unicode(0xf700);
}
if( [key isEqualToString:@"down"] ) {
return unicode(0x001f);
return unicode(0xf701);
}
if( [key isEqualToString:@"space"] ) {
return unicode(0x0020);
Expand Down
8 changes: 4 additions & 4 deletions v3/pkg/application/menuitem_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,16 @@ NSString* translateKey(NSString* key) {
return unicode(0x001b);
}
if( [key isEqualToString:@"left"] ) {
return unicode(0x001c);
return unicode(0xf702);
}
if( [key isEqualToString:@"right"] ) {
return unicode(0x001d);
return unicode(0xf703);
}
if( [key isEqualToString:@"up"] ) {
return unicode(0x001e);
return unicode(0xf700);
}
if( [key isEqualToString:@"down"] ) {
return unicode(0x001f);
return unicode(0xf701);
}
if( [key isEqualToString:@"space"] ) {
return unicode(0x0020);
Expand Down

0 comments on commit 2b3c96a

Please sign in to comment.