pb 判断触发键盘按键 附:pb键盘键值枚举值

pb  判断触发键盘按键   附:pb键盘键值枚举值

 

定义一个事件key(pbm_keydown),然后在事件里写  
  if   key=keyescape!   then  
        close(this)//要处理的事件  
  end   if   
 

 

 

 

 

 附:pb键盘键值枚举值

 

Type of key                    KeyCode values and descriptions
Mouse buttons KeyLeftButton! Left mouse button

KeyMiddleButton! Middle mouse button

KeyRightButton! Right mouse button
Letters    KeyA! - KeyZ! A - Z, uppercase or lowercase
Other symbols 

KeyQuote! ' and "

KeyEqual! = and +

KeyComma! , and <

KeyDash! - and _

KeyPeriod! . and >

KeySlash! / and ?

KeyBackQuote! ` and ~

KeyLeftBracket! [ and {

KeyBackSlash! / and |

KeyRightBracket! ] and }

KeySemiColon! ; and :

 


Non-printing characters 

KeyBack! Backspace

KeyTab!

KeyEnter!

KeySpaceBar!
Function keys 

KeyF1! -

KeyF12! Function keys F1 to F12


Control keys 

KeyShift!

KeyControl!

KeyAlt!KeyPause!

KeyCapsLock!

KeyEscape!

KeyPrintScreen!

KeyInsert!KeyDelete!
Navigation keys 

KeyPageUp!

KeyPageDown!KeyEnd!

KeyHome!

KeyLeftArrow!

KeyUpArrow!

KeyRightArrow!

KeyDownArrow!
Numeric and symbol keys 

Key0! 0 and )

Key1! 1 and !

Key2! 2 and @

Key3! 3 and #

Key4! 4 and $

Key5! 5 and %

Key6! 6 and ^

Key7! 7 and &

Key8! 8 and *

Key9! 9 and (
Keypad numbers 

KeyNumpad0! - KeyNumpad9! 0 - 9 on the numeric keypad
Keypad symbols 

KeyMultiply! * on numeric keypadKeyAdd! + on numeric keypadKeySubtract! - on numeric keypadKeyDecimal! . on numeric keypadKeyDivide! / on numeric keypadKeyNumLock!KeyScrollLock!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值