⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 键盘输入判断.txt

📁 PB常用技巧 PB常用技巧 PB常用技巧
💻 TXT
字号:
键盘输入判断

我们经常要在窗口的KEY事件中通过键盘按键做相应操作,比如KEY事件中代码:

choose case key
  case key1!,keynumpad1!
     ddlb_xcname.Selectitem(1)
     ddlb_xcname.triggerevent("selectionchanged")
  case key2!,keynumpad2!
      .......
end choose

键盘相应按键判断可以查询KeyDown()函数,相关说明:

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 numeric keypad


Keypad symbols 

KeyMultiply!    * on numeric keypad

KeyAdd!    + on numeric keypad

KeySubtract!    - on numeric keypad

KeyDecimal!    . on numeric keypad

KeyDivide!    / on numeric keypad

KeyNumLock!KeyScrollLock!


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -