Java Robot Keypress命令键 [英] Java Robot Keypress Command Key

查看:1516
本文介绍了Java Robot Keypress命令键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

mac上的命令键的VK_ [key]代码是什么(如果存在)?我正在尝试让机器人(java Robot)按下命令键。我正在使用命令keyPress(),我需要知道mac上命令键的整数键码。

What is the VK_[key] code for the command key on a mac, if one exists? I am trying to get a Robot (java Robot) to press the command key. I am using the command keyPress(), and I need to know the integer keycode for the command key on a mac.

推荐答案

KeyEvent.VK_META ,键码 157 ,是Java的虚拟键,映射到Mac命令键。

KeyEvent.VK_META, with key code 157, is Java's virtual key that maps to the the Mac command key.

这篇关于Java Robot Keypress命令键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆