如何在 Mac OS (`⌥+a` ) 中按 `alt+a`/`option+a` 键绑定时禁用生成特殊字符? [英] How to disable generating special characters when pressing the `alt+a`/`option+a` keybinding in Mac OS (`⌥+a` )?

查看:29
本文介绍了如何在 Mac OS (`⌥+a` ) 中按 `alt+a`/`option+a` 键绑定时禁用生成特殊字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图禁用我的 Mac 中的一种行为.

There is a behavior in my mac that I'm trying to disable.

当我在任何文本编辑器中并使用 alt/option+任何字母键入组合键时,输出将是特殊字符.

When I'm in any text editor and typing a key combination using the alt/option+any letter, the output will be special characters.

例如:
alt+a 组合将生成 å.
alt+x 组合会生成 .

For example:
the combination alt+a will generate å.
the combination alt+x will generate .

我想取消这个行为.
我是一名程序员,当我使用我的代码编辑器时,我想将一些键绑定(键盘快捷键)映射到 alt 键(例如 ⌥+a)但是当我这样做它不会执行,因为它会生成特殊字符.
我猜这个特殊字符优先于我的代码编辑器快捷方式.

I want to cancel this behavior.
I'm a programmer and when I use my code editor I want to map some keybinding (keyboard shortcuts) to the alt key (⌥+a for example) but when I do that it doesn't execute because it generates the special characters.
I guess that the special character has a priority over my code editor shortcuts.

您知道如何禁用此默认行为吗?

Do you know how can I disable this default behavior?

谢谢

推荐答案

我在完全相同的 IDE 中遇到了完全相同的问题.

I was having the exact same problem, in the exact same IDE.

解决方法是从这里下载 Ukulele:

The solution to this is to download Ukulele from here:

http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=u​​kelele

在应用程序中,您可以使用 File -> New from current source 创建新的按键布局.按下 Option 将在 Option-b 的位置显示一个红色键 - 表示它是一个 死键.双击它将允许您将其从死键更改为输出键.当提示输入输出时,您可以输入相同的内容(按 Option-b).

In the application you can create a new keylayout using File -> New from current source. Pressing Option will show you in the place for Option-b a red colored key - meaning it's a dead key. Double clicking it will allow you to change it from a dead key to an output key. When prompted for the output you can put in the same thing (by pressing Option-b).

因此它将输出相同的字符但不会被视为死键,因此 Intellij 可以将其绑定为快捷方式.

Thus it will output the same character but will not be considered a dead key, so Intellij can bind it as a shortcut.

要启用您的新布局,您必须将其保存到您的 ~/Library/Keyboard Layouts 中(如果您使用 Keyboard -> Set Keyboard Name 给它一个新名称会有所帮助),然后启用它从系统偏好设置-> 语言 &文字.

To enable your new layout you must save it into your ~/Library/Keyboard Layouts (it helps if you give it a new name with Keyboard -> Set Keyboard Name), and then enable it from System Preferences -> Language & Text.

这篇关于如何在 Mac OS (`⌥+a` ) 中按 `alt+a`/`option+a` 键绑定时禁用生成特殊字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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