From 738edb650d8a6b2023284b05e8731f5cbc81039a Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 21 Jun 2016 12:33:02 -0700 Subject: [PATCH 1/2] Make NSDeleteFunctionKey to NSDeleteCharacter --- atom/browser/ui/accelerator_util_mac.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/atom/browser/ui/accelerator_util_mac.mm b/atom/browser/ui/accelerator_util_mac.mm index e2448833ab0d..cf1d3de4d212 100644 --- a/atom/browser/ui/accelerator_util_mac.mm +++ b/atom/browser/ui/accelerator_util_mac.mm @@ -29,6 +29,10 @@ void SetPlatformAccelerator(ui::Accelerator* accelerator) { modifiers ^= NSShiftKeyMask; } + if (character == NSDeleteFunctionKey) { + character = NSDeleteCharacter; + } + NSString* characters = [[[NSString alloc] initWithCharacters:&character length:1] autorelease]; From 9486df1303e889a3ac2f8e3284cf271624383cc3 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 21 Jun 2016 12:38:44 -0700 Subject: [PATCH 2/2] Add delete accelerator to delete menu --- default_app/main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/default_app/main.js b/default_app/main.js index 4c3c65842094..7b9ba67d5998 100644 --- a/default_app/main.js +++ b/default_app/main.js @@ -86,6 +86,7 @@ app.once('ready', () => { }, { label: 'Delete', + accelerator: 'Delete', role: 'delete' }, {