- 浏览: 1088230 次
- 性别:
- 来自: 杭州
文章分类
- 全部博客 (695)
- 心情日记 (14)
- AS开发工具 (12)
- 文章转载 (99)
- AIR (5)
- 问题总结 (46)
- SWF格式 (7)
- 测试总结 (10)
- 外文资料 (9)
- 算法技术 (33)
- AS3常用开源库 (43)
- 源码范例 (102)
- FLEX (72)
- FLASH 优化 (33)
- 游戏开发 (49)
- 开发技术 (11)
- 工作应用 (34)
- AS3收集 (140)
- WebBase (0)
- 开发构想 (4)
- 设计模式 (2)
- 框架和框架范例 (19)
- RED5 (3)
- java开发 (3)
- JAVA (1)
- FLASH-3D (23)
- 3D (6)
- 书籍 (10)
- 业界信息资料 (3)
- C# (1)
- JavaScript (12)
- HTML5 (6)
- Flixel (1)
- D5Power RPG网页游戏引擎 (0)
- ColorMatrixFilter - 获得相应颜色的色调 函数 (0)
- Starling (0)
最新评论
-
老顽童203:
字体
水果忍者鼠标跟随特效制作[转载] -
hairball00:
[转] 放出超多的Flash组件源代码 -
he74552775:
flash AS3 RegExp简单功能用法(转) -
hanshuai1232000:
第四点,有利也有弊,等你做了大型的aprg,你就知道了
[转]位图数据内存优化 -
yangfantao:
太感谢
[转] 放出超多的Flash组件源代码
keycode 8 = BackSpace BackSpace
keycode 9 = Tab Tab
keycode 12 = Clear
keycode 13 = Enter
keycode 16 = Shift_L
keycode 17 = Control_L
keycode 18 = Alt_L
keycode 19 = Pause
keycode 20 = Caps_Lock
keycode 27 = Escape Escape
keycode 32 = space space
keycode 33 = Prior
keycode 34 = Next
keycode 35 = End
keycode 36 = Home
keycode 37 = Left
keycode 38 = Up
keycode 39 = Right
keycode 40 = Down
keycode 41 = Select
keycode 42 = Print
keycode 43 = Execute
keycode 45 = Insert
keycode 46 = Delete
keycode 47 = Help
keycode 48 = 0 equal braceright
keycode 49 = 1 exclam onesuperior
keycode 50 = 2 quotedbl twosuperior
keycode 51 = 3 section threesuperior
keycode 52 = 4 dollar
keycode 53 = 5 percent
keycode 54 = 6 ampersand
keycode 55 = 7 slash braceleft
keycode 56 = 8 parenleft bracketleft
keycode 57 = 9 parenright bracketright
keycode 65 = a A
keycode 66 = b B
keycode 67 = c C
keycode 68 = d D
keycode 69 = e E EuroSign
keycode 70 = f F
keycode 71 = g G
keycode 72 = h H
keycode 73 = i I
keycode 74 = j J
keycode 75 = k K
keycode 76 = l L
keycode 77 = m M mu
keycode 78 = n N
keycode 79 = o O
keycode 80 = p P
keycode 81 = q Q at
keycode 82 = r R
keycode 83 = s S
keycode 84 = t T
keycode 85 = u U
keycode 86 = v V
keycode 87 = w W
keycode 88 = x X
keycode 89 = y Y
keycode 90 = z Z
keycode 96 = KP_0 KP_0
keycode 97 = KP_1 KP_1
keycode 98 = KP_2 KP_2
keycode 99 = KP_3 KP_3
keycode 100 = KP_4 KP_4
keycode 101 = KP_5 KP_5
keycode 102 = KP_6 KP_6
keycode 103 = KP_7 KP_7
keycode 104 = KP_8 KP_8
keycode 105 = KP_9 KP_9
keycode 106 = KP_Multiply KP_Multiply
keycode 107 = KP_Add KP_Add
keycode 108 = KP_Separator KP_Separator
keycode 109 = KP_Subtract KP_Subtract
keycode 110 = KP_Decimal KP_Decimal
keycode 111 = KP_Divide KP_Divide
keycode 112 = F1
keycode 113 = F2
keycode 114 = F3
keycode 115 = F4
keycod
Keycode 116 = F5
keycode 117 = F6
keycode 118 = F7
keycode 119 = F8
keycode 120 = F9
keycode 121 = F10
keycode 122 = F11
keycode 123 = F12
keycode 124 = F13
keycode 125 = F14
keycode 126 = F15
keycode 127 = F16
keycode 128 = F17
keycode 129 = F18
keycode 130 = F19
keycode 131 = F20
keycode 132 = F21
keycode 133 = F22
keycode 134 = F23
keycode 135 = F24
keycode 136 = Num_Lock
keycode 137 = Scroll_Lock
keycode 187 = acute grave
keycode 188 = comma semicolon
keycode 189 = minus underscore
keycode 190 = period colon
keycode 192 = numbersign apostrophe
keycode 210 = plusminus hyphen macron
keycode 211 =
keycode 212 = copyright registered
keycode 213 = guillemotleft guillemotright
keycode 214 = masculine ordfeminine
keycode 215 = ae AE
keycode 216 = cent yen
keycode 217 = questiondown exclamdown
keycode 218 = onequarter onehalf threequarters
keycode 220 = less greater bar
keycode 221 = plus asterisk asciitilde
keycode 227 = multiply division
keycode 228 = acircumflex Acircumflex
keycode 229 = ecircumflex Ecircumflex
keycode 230 = icircumflex Icircumflex
keycode 231 = ocircumflex Ocircumflex
keycode 232 = ucircumflex Ucircumflex
keycode 233 = ntilde Ntilde
keycode 234 = yacute Yacute
keycode 235 = oslash Ooblique
keycode 236 = aring Aring
keycode 237 = ccedilla Ccedilla
keycode 238 = thorn THORN
keycode 239 = eth ETH
keycode 240 = diaeresis cedilla currency
keycode 241 = agrave Agrave atilde Atilde
keycode 242 = egrave Egrave
keycode 243 = igrave Igrave
keycode 244 = ograve Ograve otilde Otilde
keycode 245 = ugrave Ugrave
keycode 246 = adiaeresis Adiaeresis
keycode 247 = ediaeresis Ediaeresis
keycode 248 = idiaeresis Idiaeresis
keycode 249 = odiaeresis Odiaeresis
keycode 250 = udiaeresis Udiaeresis
keycode 251 = ssharp question backslash
keycode 252 = asciicircum degree
keycode 253 = 3 sterling
keycode 254 = Mode_switch
使用 event 对象的 keyCode 属性判断输入的键值
eg : if(event.keyCode==13)alert( “ enter! ” );
键值对应表
A 0X65 U 0X85
B 0X66 V 0X86
C 0X67 W 0X87
D 0X68 X 0X88
E 0X69 Y 0X89
F 0X70 Z 0X90
G 0X71 0 0X48
H 0X72 1 0X49
I 0X73 2 0X50
J 0X74 3 0X51
K 0X75 4 0X52
L 0X76 5 0X53
M 0X77 6 0X54
N 0X78 7 0X55
O 0X79 8 0X56
P 0X80 9 0X57
Q 0X81 ESC 0X1B
R 0X82 CTRL 0X11
S 0X83 SHIFT 0X10
T 0X84 ENTER 0XD
keycode 9 = Tab Tab
keycode 12 = Clear
keycode 13 = Enter
keycode 16 = Shift_L
keycode 17 = Control_L
keycode 18 = Alt_L
keycode 19 = Pause
keycode 20 = Caps_Lock
keycode 27 = Escape Escape
keycode 32 = space space
keycode 33 = Prior
keycode 34 = Next
keycode 35 = End
keycode 36 = Home
keycode 37 = Left
keycode 38 = Up
keycode 39 = Right
keycode 40 = Down
keycode 41 = Select
keycode 42 = Print
keycode 43 = Execute
keycode 45 = Insert
keycode 46 = Delete
keycode 47 = Help
keycode 48 = 0 equal braceright
keycode 49 = 1 exclam onesuperior
keycode 50 = 2 quotedbl twosuperior
keycode 51 = 3 section threesuperior
keycode 52 = 4 dollar
keycode 53 = 5 percent
keycode 54 = 6 ampersand
keycode 55 = 7 slash braceleft
keycode 56 = 8 parenleft bracketleft
keycode 57 = 9 parenright bracketright
keycode 65 = a A
keycode 66 = b B
keycode 67 = c C
keycode 68 = d D
keycode 69 = e E EuroSign
keycode 70 = f F
keycode 71 = g G
keycode 72 = h H
keycode 73 = i I
keycode 74 = j J
keycode 75 = k K
keycode 76 = l L
keycode 77 = m M mu
keycode 78 = n N
keycode 79 = o O
keycode 80 = p P
keycode 81 = q Q at
keycode 82 = r R
keycode 83 = s S
keycode 84 = t T
keycode 85 = u U
keycode 86 = v V
keycode 87 = w W
keycode 88 = x X
keycode 89 = y Y
keycode 90 = z Z
keycode 96 = KP_0 KP_0
keycode 97 = KP_1 KP_1
keycode 98 = KP_2 KP_2
keycode 99 = KP_3 KP_3
keycode 100 = KP_4 KP_4
keycode 101 = KP_5 KP_5
keycode 102 = KP_6 KP_6
keycode 103 = KP_7 KP_7
keycode 104 = KP_8 KP_8
keycode 105 = KP_9 KP_9
keycode 106 = KP_Multiply KP_Multiply
keycode 107 = KP_Add KP_Add
keycode 108 = KP_Separator KP_Separator
keycode 109 = KP_Subtract KP_Subtract
keycode 110 = KP_Decimal KP_Decimal
keycode 111 = KP_Divide KP_Divide
keycode 112 = F1
keycode 113 = F2
keycode 114 = F3
keycode 115 = F4
keycod
Keycode 116 = F5
keycode 117 = F6
keycode 118 = F7
keycode 119 = F8
keycode 120 = F9
keycode 121 = F10
keycode 122 = F11
keycode 123 = F12
keycode 124 = F13
keycode 125 = F14
keycode 126 = F15
keycode 127 = F16
keycode 128 = F17
keycode 129 = F18
keycode 130 = F19
keycode 131 = F20
keycode 132 = F21
keycode 133 = F22
keycode 134 = F23
keycode 135 = F24
keycode 136 = Num_Lock
keycode 137 = Scroll_Lock
keycode 187 = acute grave
keycode 188 = comma semicolon
keycode 189 = minus underscore
keycode 190 = period colon
keycode 192 = numbersign apostrophe
keycode 210 = plusminus hyphen macron
keycode 211 =
keycode 212 = copyright registered
keycode 213 = guillemotleft guillemotright
keycode 214 = masculine ordfeminine
keycode 215 = ae AE
keycode 216 = cent yen
keycode 217 = questiondown exclamdown
keycode 218 = onequarter onehalf threequarters
keycode 220 = less greater bar
keycode 221 = plus asterisk asciitilde
keycode 227 = multiply division
keycode 228 = acircumflex Acircumflex
keycode 229 = ecircumflex Ecircumflex
keycode 230 = icircumflex Icircumflex
keycode 231 = ocircumflex Ocircumflex
keycode 232 = ucircumflex Ucircumflex
keycode 233 = ntilde Ntilde
keycode 234 = yacute Yacute
keycode 235 = oslash Ooblique
keycode 236 = aring Aring
keycode 237 = ccedilla Ccedilla
keycode 238 = thorn THORN
keycode 239 = eth ETH
keycode 240 = diaeresis cedilla currency
keycode 241 = agrave Agrave atilde Atilde
keycode 242 = egrave Egrave
keycode 243 = igrave Igrave
keycode 244 = ograve Ograve otilde Otilde
keycode 245 = ugrave Ugrave
keycode 246 = adiaeresis Adiaeresis
keycode 247 = ediaeresis Ediaeresis
keycode 248 = idiaeresis Idiaeresis
keycode 249 = odiaeresis Odiaeresis
keycode 250 = udiaeresis Udiaeresis
keycode 251 = ssharp question backslash
keycode 252 = asciicircum degree
keycode 253 = 3 sterling
keycode 254 = Mode_switch
使用 event 对象的 keyCode 属性判断输入的键值
eg : if(event.keyCode==13)alert( “ enter! ” );
键值对应表
A 0X65 U 0X85
B 0X66 V 0X86
C 0X67 W 0X87
D 0X68 X 0X88
E 0X69 Y 0X89
F 0X70 Z 0X90
G 0X71 0 0X48
H 0X72 1 0X49
I 0X73 2 0X50
J 0X74 3 0X51
K 0X75 4 0X52
L 0X76 5 0X53
M 0X77 6 0X54
N 0X78 7 0X55
O 0X79 8 0X56
P 0X80 9 0X57
Q 0X81 ESC 0X1B
R 0X82 CTRL 0X11
S 0X83 SHIFT 0X10
T 0X84 ENTER 0XD
发表评论
-
HttpStatusConfig --一个HTTP 协议返回的 解析说明类
2012-04-18 16:40 0package guwanyuan.qicool.game ... -
水果忍者鼠标跟随特效制作[转载]
2012-03-01 16:06 2457实现这效果其实比较简单,主要是思路~! package ... -
江湖情缘游戏里的跳的类
2012-02-08 23:55 0package com.app.role.montions ... -
ColorMatrixFilter - 获得相应颜色的色调 函数
2012-02-08 23:03 0/**获得相应颜色的色调的滤镜**/ public sta ... -
ARPG游戏引擎设计思路
2011-12-31 00:48 00.整体结构 下载 (32.92 KB ... -
五子棋算法详解
2011-10-31 04:14 0五子棋算法详解五子棋算法详解五子棋算法详解 -
[原创]围绕任意一个中心点旋转
2011-10-23 13:46 0package guwanyuan.qicool.game.c ... -
珍宝探索 AS3-过关类小游戏
2011-10-13 02:15 0珍宝探索 AS3-过关类小游戏 -
(RepeaterOverTimeLine能将一个for循环执行的工作类似异步地平摊到多个帧上)RepeaterOverTimeLine
2011-09-30 02:26 0(RepeaterOverTimeLine能将一个for循环执 ... -
box2dttest(台球demo,使用了box2d)
2011-09-21 01:49 0box2dttest(台球demo,使用了box2d) -
贪吃蛇游戏
2011-09-16 02:40 0package com { /** ... -
打豆豆
2011-09-08 00:34 0打豆豆打豆豆 -
经典代码-空战.zip (513.2 KB)
2011-09-02 02:24 0经典代码-空战.zip (513.2 KB) -
基于TextField的图文混编的组件
2011-09-01 23:04 0基于TextField的图文混编的组件 -
泡泡龙
2011-08-29 22:36 0泡泡龙泡泡龙泡泡龙 -
井字棋算法
2011-08-18 15:04 0井字棋算法井字棋算法 -
_超级玛丽游戏_flash_game_demo
2011-08-18 00:01 0_超级玛丽游戏_flash_game_demo.zip -
吴万江-TD_demo
2011-08-15 15:35 0吴万江-TD_demo -
S_eVent系列教程
2011-08-13 05:01 0S_eVent系列教程S_eVent系列教程 -
[转][翻译]LoaderMax使用指导(一)
2011-08-10 19:51 1908http://hi.baidu.com/mr_ziqiang/ ...
相关推荐
### 键盘Keycode值与JavaScript触发事件 在前端开发中,经常需要处理用户的键盘输入事件,例如表单验证、快捷键操作等场景。在JavaScript中,可以通过监听`keydown`、`keyup`或`keypress`事件来获取用户按下的按键...
在JavaScript等前端开发语言中,keycode可以通过`KeyboardEvent.keyCode`属性获取,该属性返回一个整数,表示触发事件的键的keycode。这使得开发者可以编写代码来监听特定按键的按下或释放,从而实现诸如快捷键功能...
`keyCode` 是 `KeyboardEvent` 对象的一个属性,用于表示触发键盘事件时按下的键的虚拟键码。它返回一个整数值,代表按键的类型。在不同的操作系统和浏览器之间,`keyCode` 的值可能有所不同,但大部分常用的键码值...
这是因为浏览器并不直接支持ANSI键代码,它们通常返回的是W3C标准的DOM KeyboardEvent对象中的`keyCode`属性值,这个值是基于Unicode的,而不是ANSI。`ansi-keycode`通过内部映射表,将这些Unicode键代码转换为对应...
6. **非ASCII键的处理**:对于非英文字符,如特殊符号或非拉丁字母,`keyCode`可能不足以识别,这时可以使用`charCode`属性,或者在现代浏览器中使用`KeyboardEvent.code`属性。 7. **特殊键**:某些特殊键如F1-F12...
但需要注意,不同的键盘布局可能会导致keyCode值有所不同。例如,国际布局的键盘可能需要使用不同的keyCode来识别某些特殊字符。 五、示例:使用键盘移动对象 一个常见的应用是在游戏中使用键盘控制角色移动。例如...
Javascript 代码 代码如下: function keyNumAll(evt){ //兼容IE和Firefox获得keyBoardEvent对象 evt = (evt) ? evt : ((window.event) ? window.event : “”); var key = evt.keyCode?evt.keyCode:evt.which;//...
在JavaScript中,`keyCode`属性是`KeyboardEvent`接口的一部分,用于获取用户按下键盘键时的整数编码。这个属性非常有用,尤其是在开发需要键盘输入的应用程序时。`keyCode`的值可以用来识别特定的按键,从而执行...
switch (event.keyCode) { case KeyboardEvent.A: trace("您按下了 A 键"); break; case KeyboardEvent.NUMPAD_1: trace("您按下了数字小键盘的 1 键"); break; // 其他键 } } ``` 这里 `KeyboardEvent.A`...
例如,以下是一些常见的keyCode值: - 回车键:13 - 空格键:32 - 左箭头:37 - 上箭头:38 - 右箭头:39 - 下箭头:40 通过了解这些键码,开发者可以编写出精确控制用户输入的JavaScript代码。比如,我们可以监听`...
"Flash键盘码"是指AS3中与键盘按键对应的整数值,这些值可以用来识别用户在键盘上按下的特定键。 在AS3中,键盘事件通常通过`KeyboardEvent`类来处理。当用户按下或释放一个键时,会产生相应的键盘事件,如`...
这个对象包含了有关事件的详细信息,如`keyCode`、`charCode`、`key`等,还可以通过`event.preventDefault()`阻止默认行为,如阻止字符输入到文本框。 5. **阻止默认行为**:有时我们可能希望阻止键盘事件的默认...
这个函数通常会接收到一个`KeyboardEvent`对象作为参数,该对象包含了关于键盘事件的所有信息,如按键码(keyCode)等: ```actionscript function handleKeyDown(event:KeyboardEvent):void { // 处理键盘按下...
var event = new KeyboardEvent('keydown', { keyCode: keyCode }); document.body.dispatchEvent(event); setTimeout(function() { var upEvent = new KeyboardEvent('keyup', { keyCode: keyCode }); ...
Event类是所有事件的基础类,而KeyboardEvent类则专门处理与键盘相关的事件,如KEY_DOWN(当用户按下键盘键时触发)和KEY_UP(当用户释放键盘键时触发)。 下面是一个简单的AS3键盘响应的例子: ```actionscript ...
- `keyCode`/`which`:表示按键的编码值。`keyCode`在IE中使用,而`which`在其他浏览器中使用。 - `charCode`:`keypress`事件中可用,表示被按下的键所对应的字符值。 #### 3. 浏览器兼容性问题 - **不同浏览器...
{key: keyCode, code: keyCode, location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD}); } return event; } // 使用示例 const accelerator = 'Ctrl+Shift+C'; const event = acceleratorToKeyboardEvent...
// moveSpeed是预设的速度值 } ``` 然后在`keyUpHandler`中,我们恢复到静止状态: ```as3 if (event.keyCode == Keyboard.RIGHT) { this.speedX = 0; } ``` 为了在每个帧更新小球的位置,我们需要覆盖`update()`...
值得注意的是,现代浏览器中已经标准化了`KeyboardEvent`的属性,推荐使用`event.key`来获取按键的值,它会返回一个可读的字符串(如"Enter"或"A"),而不依赖于浏览器的实现。`event.keyCode`已经被弃用,`event....
例如,可以创建一个数组来存储当前被按下的键,并在`KeyboardEvent.KEY_DOWN`和`KeyboardEvent.KEY_UP`事件中更新这个数组。 ```actionscript var pressedKeys:Array = []; stage.addEventListener(KeyboardEvent....