From dcec14decdee22afb2219ba0b83466c4c72185e1 Mon Sep 17 00:00:00 2001 From: Alexander Ljungberg Date: Thu, 10 Jun 2010 20:49:43 -0400 Subject: [PATCH] Fixed: delete (backspace) and forward delete were switched as compared to Cocoa. Fixed: delete could not be used as a key equivalent without a modifier. --- AppKit/CPEvent.j | 1 + AppKit/Platform/DOM/CPPlatformWindow+DOM.j | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/AppKit/CPEvent.j b/AppKit/CPEvent.j index f50c15130..581c3349a 100644 --- a/AppKit/CPEvent.j +++ b/AppKit/CPEvent.j @@ -560,6 +560,7 @@ var _CPEventPeriodicEventPeriod = 0, { case CPBackspaceCharacter: case CPDeleteCharacter: + case CPDeleteFunctionKey: case CPTabCharacter: case CPCarriageReturnCharacter: case CPEscapeFunctionKey: diff --git a/AppKit/Platform/DOM/CPPlatformWindow+DOM.j b/AppKit/Platform/DOM/CPPlatformWindow+DOM.j index e5bd7a19d..2132d0c80 100644 --- a/AppKit/Platform/DOM/CPPlatformWindow+DOM.j +++ b/AppKit/Platform/DOM/CPPlatformWindow+DOM.j @@ -144,8 +144,8 @@ var KeyCodesToPrevent = {}, KeyCodesToPrevent[CPKeyCodes.A] = YES; -KeyCodesToFunctionUnicodeMap[CPKeyCodes.BACKSPACE] = CPBackspaceCharacter; -KeyCodesToFunctionUnicodeMap[CPKeyCodes.DELETE] = CPDeleteCharacter; +KeyCodesToFunctionUnicodeMap[CPKeyCodes.BACKSPACE] = CPDeleteCharacter; +KeyCodesToFunctionUnicodeMap[CPKeyCodes.DELETE] = CPDeleteFunctionKey; KeyCodesToFunctionUnicodeMap[CPKeyCodes.TAB] = CPTabCharacter; KeyCodesToFunctionUnicodeMap[CPKeyCodes.ENTER] = CPCarriageReturnCharacter; KeyCodesToFunctionUnicodeMap[CPKeyCodes.ESC] = CPEscapeFunctionKey;