简体   繁体   中英

how to bind keyboard shortcut to nsbutton in cocoa

我想知道如何向按钮添加键盘快捷键,例如按“R”键按下“阅读”按钮,按“M”键按下按钮“含义”,其中“阅读”和“含义”是window.nib中的按钮文件

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

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM