如何映射 Ctrl + TextMate 中文档的数字起始/结束到开始/结束

发布于 2024-12-24 04:03:55 字数 439 浏览 3 评论 0原文

我真的很想按照标题中指定的方式映射这些键,但我不知道该怎么做。

我的目标是让键盘尽可能接近 Windows,因为很难忘记 25 年以上的键盘布局经验。我已经成功实现了 95% 的目标,但我无法让最后一点发挥作用。

我已将其放在 ~/Library/KeyBindings/DefaultKeyBinding.dict 中,

{   
    "^\UF729" = "moveToBeginningOfDocument:";
    "^\UF72B" = "moveToEndOfDocument:"; 
} 

它适用于常规 Home/End 键,但不适用于数字键盘上的键。

我也在使用 KeyRemap4MacBook,它解决了很多问题,但不是全部。

谁能帮忙解决这个问题吗?一个额外的问题是为什么新布局在某些应用程序中被忽略?

I really REALLY want to map these keys as specified in the title, but I cant find out how to do it.

My aim is to get the keyboard as close to Windows as possible since its hard to un-learn 25+ years of experience with that layout. I have managed to get 95% as I want it, but I cant get this last bit to work.

I have put this is in ~/Library/KeyBindings/DefaultKeyBinding.dict

{   
    "^\UF729" = "moveToBeginningOfDocument:";
    "^\UF72B" = "moveToEndOfDocument:"; 
} 

It works with the regular Home/End keys, but not with those on the numeric keyboard.

I'm also using KeyRemap4MacBook, which solves a lot but not everything.

Can anyone help with this? A bonus question is why the new layout is ignore in some applications?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

疏忽 2024-12-31 04:03:55

代码片段中的键是常规的 homeend 键。您不认为它不能与您指定的键以外的其他键一起使用吗?

我不是 100% 确定,但我认为 Mac OS X 根本不支持这种“数字键作为导航键”业务,至少本身不支持。

如果您想从数字键盘重新映射 71,您必须在 ~/Library/KeyBindings/DefaultKeyBinding.dict< 中再添加两行/code> 这两个键。

至于你的额外问题:你的自定义键绑定仅影响 Cocoa 应用程序。您不能真正期望基于 Java/GTK/QT/Whatever 的应用程序尊重它们。 Adobe/微软的应用程序在这方面是严重的违规者。您在使用其他哪些应用程序时遇到了问题?哎呀,就连苹果公司在采用自己的狗粮方面也进展缓慢(Finder、iTunes)。

The keys in your snippet are the regular home and end keys. Don't you think it's a good thing that it doesn't work with other keys than the ones you have specified?

I am not 100% sure but I think that Mac OS X doesn't support this "numeric keys as navigation keys" business at all, at least natively.

If you want to remap the 7 and the 1 from the numeric keypad you will have to add two more lines to ~/Library/KeyBindings/DefaultKeyBinding.dict for these two keys.

As for your bonus question: your custom keybindings only affect Cocoa apps. You can't really expect Java/GTK/QT/Whatever-based applications to respect them. Apps by Adobe/Microsoft are serious offenders in this regard. What other applications do you have troubles with? Hell, even Apple has been slow at adopting their own dog food (Finder, iTunes).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文