OS X 终端:同时使用元键 + alt 功能 [英] OS X Terminal: Meta key + alt functionality at the same time

查看:18
本文介绍了OS X 终端:同时使用元键 + alt 功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法使用 alt/option 键作为元键,但仍然可以使用它来制作一些需要它的字符?

Is there a way to use an alt / option key as a meta key but still be able to use it to make some characters which need it?

例如,在我的本地键盘布局中:

For example, in my local keyboard layout:

  • @alt + 2
  • alt + shift + 7
  • |alt + 7
  • 等等
  • @ is alt + 2
  • is alt + shift + 7
  • | is alt + 7
  • etc.

所以,如果我将 alt 设置为元键,我就不能再制作这些字符了.另一方面,使用按esc,释放esc,按一个键"来制作元键序列让我的手很痛.

So, if I set alt as a meta key, I can't make those characters anymore. On the other hand, using "press esc, release esc, press a key" to make meta key sequences makes my hands hurt.

任何使用国际键盘的 Emacs 用户已经解决了这个问题,请提供您可能有的任何提示!:)

Any Emacs users with international keyboards who have solved this, please give any tips you might have! :)

看来我可以将 alt 设置为元键,然后在 inputrc 中添加这些设置: "e2": "@" 这适用于bash shell,但它仍然无法与 Emacs 一起使用,所以不好.

It appears that I can set alt as a meta key and then add these kind of settings in inputrc: "e2": "@" This works in the bash shell but it still won't work with Emacs though, so no good.

推荐答案

考虑为 Mac OS X 使用功能齐全的 Emacs.我使用的是 Carbon Emacs,但我相信其他人(比如 Aqua Emacs 或 X11 Emacs)可以解决问题.

Think about using a full featured Emacs for Mac OS X. I use Carbon Emacs but I believe others (say Aqua Emacs or X11 Emacs) would do the trick.

如果您坚持在终端中使用 Emacs,您可以使用 C-x 8 前缀作为撰写键.尝试 C-x 8 C-h 以获取可能性列表.

If you insist on using Emacs in a terminal you can use the C-x 8 prefix as a compose key. Try C-x 8 C-h to get a list of possibilities.

请参阅 http://www.emacswiki.org/emacs/EmacsForMacOS

这篇关于OS X 终端:同时使用元键 + alt 功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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