flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject git commit: [flex-asjs] [refs/heads/tlf] - Fixed keyboard events
Date Mon, 19 Jun 2017 20:30:04 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/tlf 31056ecd4 -> 5ac1e6a00


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/tlf
Commit: 5ac1e6a006d3c6349a8a2bab89f78d1adb60d050
Parents: 31056ec
Author: Harbs <harbs@in-tools.com>
Authored: Mon Jun 19 23:29:59 2017 +0300
Committer: Harbs <harbs@in-tools.com>
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();


Mime
View raw message