windows虚拟键码_Windows使用的虚拟键码

windows虚拟键码

Windows defines special constants for each key the user can press. The virtual-key codes identify various virtual keys. These constants can then be used to refer to the keystroke when using Delphi and Windows API calls or in an OnKeyUp or OnKeyDown event handler. Virtual keys mainly consist of actual keyboard keys, but also include "virtual" elements such as the three mouse buttons. Delphi defines all constants for Windows virtual key codes in the Windows unit.

Windows为用户可以按的每个键定义特殊的常数。 虚拟密钥代码标识各种虚拟密钥。 然后,在使用Delphi和Windows API调用或在OnKeyUpOnKeyDown事件处理程序中,可以使用这些常量来引用按键。 虚拟键主要由实际的键盘键组成,但也包含“虚拟”元素,例如三个鼠标按钮。 Delphi在Windows单元中为Windows虚拟键代码定义了所有常量。

键盘和VK码 ( Keyboard and VK Codes )

Here are some of the Delphi articles that deal with the keyboard and VK codes:

这是一些有关键盘和VK代码的Delphi文章:

Keyboard SymphonyDelphi For Beginners: Get familiar with the OnKeyDown, OnKeyUp, and onKeyPress event procedures to respond to various key actions or handle and process ASCII characters along with other special purpose keys.

初学者的 键盘交响曲 Delphi:熟悉OnKeyDown,OnKeyUp和onKeyPress事件过程,以响应各种键操作或处理和处理ASCII字符以及其他专用键。

How to Translate a Virtual Key Code into a CharacterWindows defines special constants for each key the user can press. The virtual-key codes identify various virtual keys. In Delphi, the OnKeyDown and OnKeyUp events provide the lowest level of keyboard response. To use OnKeyDown or OnKeyUp to test for keys the user presses, you must use Virtual key codes to get the key pressed. Here's how to translate the virtual key code to the corresponding Windows character.

如何将虚拟键代码转换为CharacterWindows为用户可以按下的每个键定义了特殊的常数。 虚拟密钥代码标识各种虚拟密钥。 在Delphi中,OnKeyDown和OnKeyUp事件提供了最低级别的键盘响应。 若要使用OnKeyDown或OnKeyUp来测试用户按下的键,必须使用虚拟键代码来获得按下的键。 这是将虚拟键代码转换为相应的Windows字符的方法。

Touch Me - I'm UntouchableIntercepting keyboard input for controls that cannot receive the input focus. Working with keyboard hooks from Delphi.

触摸我-我无法触摸 ,无法接收无法接受输入焦点的控件的键盘输入。 使用Delphi的键盘挂钩。

ENTERing TabUsing the Enter key like a Tab key with Delphi controls.

进入选项卡使用Enter键就像使用Delphi控件的Tab键一样。

Abort a Loop by Pressing a KeyUse the VK_ESCAPE to abort a (for) loop.

按下键来中止循环使用VK_ESCAPE中止(for)循环。

Use Arrow Keys to Move Between ControlsThe UP and DOWN arrow keys are virtually useless in edit controls. So why not use them for navigating between fields.

使用箭头键在控件之间移动向上和向下箭头键在编辑控件中几乎没有用。 因此,为什么不使用它们在字段之间导航。

Simulating Keystrokes from CodeA handy function to simulate the pressing of keyboard keys.

通过CodeA方便的功能来模拟按键,以模拟键盘按键的按下。

翻译自: https://www.thoughtco.com/virtual-key-codes-used-by-windows-4071289

windows虚拟键码

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值