如何将键盘快捷键绑定到可可中的nsbutton [英] how to bind keyboard shortcut to nsbutton in cocoa

查看:159
本文介绍了如何将键盘快捷键绑定到可可中的nsbutton的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何向按钮添加键盘快捷方式,例如,按"R"键以按"Reading"按钮,按"M"键按意义"按钮,其中"Reading"和意义"是按钮window.nib文件

I want to know how to add keyboard shortcuts to buttons for example to press key "R" for pressing button "Reading" and key "M" for pressing button "meaning" where "Reading" and "meaning" are buttons in window.nib file

推荐答案

在NIB中选择按钮.选择属性检查器.将重点放在等效键"字段上.键入所需的击键.

Select the button in the NIB. Select the Attributes inspector. Put focus on the "Key equivalent" field. Type the desired keystroke.

这篇关于如何将键盘快捷键绑定到可可中的nsbutton的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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