Fixed keyboard events

Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/5ac1e6a0
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/5ac1e6a0
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/5ac1e6a0

Branch: refs/heads/develop
Commit: 5ac1e6a006d3c6349a8a2bab89f78d1adb60d050
Parents: 31056ec
Author: Harbs <[email protected]>
Authored: Mon Jun 19 23:29:59 2017 +0300
Committer: Harbs <[email protected]>
Committed: Mon Jun 19 23:29:59 2017 +0300

----------------------------------------------------------------------
 .../main/flex/org/apache/flex/events/KeyboardEvent.as   | 12 +++++++++---
 .../apache/flex/events/utils/KeyboardEventConverter.as  |  2 +-
 .../flex/org/apache/flex/textLayout/edit/EditManager.as |  2 +-
 3 files changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5ac1e6a0/frameworks/projects/Core/src/main/flex/org/apache/flex/events/KeyboardEvent.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/KeyboardEvent.as
 
b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/KeyboardEvent.as
index 3c626b1..aba6a53 100644
--- 
a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/KeyboardEvent.as
+++ 
b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/KeyboardEvent.as
@@ -20,9 +20,15 @@ package org.apache.flex.events
 {
     public class KeyboardEvent extends Event
     {
-        
-        public static const KEY_DOWN:String = "key_down";
-        public static const KEY_UP:String = "key_up";
+        COMPILE::SWF
+        public static const KEY_DOWN:String = "keyDown";
+        COMPILE::SWF
+        public static const KEY_UP:String = "keyUp";
+
+        COMPILE::JS
+        public static const KEY_DOWN:String = "keydown";
+        COMPILE::JS
+        public static const KEY_UP:String = "keyup";
 
         public function KeyboardEvent(
             type:String,

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5ac1e6a0/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/KeyboardEventConverter.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/KeyboardEventConverter.as
 
b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/KeyboardEventConverter.as
index fc8a630..0ad0e1d 100644
--- 
a/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/KeyboardEventConverter.as
+++ 
b/frameworks/projects/Core/src/main/flex/org/apache/flex/events/utils/KeyboardEventConverter.as
@@ -70,7 +70,7 @@ package org.apache.flex.events.utils
                COMPILE::JS
                public static function 
convert(oldEvent:KeyboardEvent):org.apache.flex.events.KeyboardEvent
                {
-                       var type:String = oldEvent.type == "keydown" ? 
"key_down" : "key_up"; 
+                       var type:String = oldEvent.type;
                        var key:String = oldEvent.key;
                        if (key == null)
                                key = 
KeyConverter.convertCharCode(oldEvent['charCode']);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/5ac1e6a0/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/edit/EditManager.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/edit/EditManager.as
 
b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/edit/EditManager.as
index 0ba8e55..99dfcee 100644
--- 
a/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/edit/EditManager.as
+++ 
b/frameworks/projects/TLF/src/main/flex/org/apache/flex/textLayout/edit/EditManager.as
@@ -308,7 +308,7 @@ package org.apache.flex.textLayout.edit
                                                                
event.preventDefault();
                                                        }
                                                        break;
-                                               case "KeyZ":    // small y
+                                               case "KeyY":    // small y
                                                        ignoreNextTextEvent = 
true;
                                                        redo();
                                                        event.preventDefault();

Reply via email to