2010-02-19 68 views
10

是否有jEdits键盘控件的行为与原生Mac OS应用程序的行为相同?jEdit Mac OS的键盘行为

通过循规蹈矩我的意思是命令+左键将插入符移动到行的开始,Alt +左​​移动到当前字等

+0

好问题!有什么进展? 我在想我自己一样。但是我在网上也找不到任何东西。恐怕你必须自己创建绑定。 .. – RngTng 2010-03-29 18:19:45

+0

没有进展,没有回应:)是的,它更多的是,jedit无法识别一些mac键时,进行绑定,所以它不仅仅是一个映射的问题。我知道在以前的jedit版本中,它有一个mac插件。但据我所知,由于它不支持JDK6,所以被删除了。 – 2010-03-30 08:58:15

回答

10

首先需要启用ALT键的开始。在位于startup.bsh文件这样做:

​​

在Mac OX这通常是:

/Applications/jEdit.app/Contents/Resources/Java/startup/startup.bsh 

以下行应该取消注释:

Debug.ALT_KEY_PRESSED_DISABLED = false; 
Debug.ALTERNATIVE_DISPATCHER = false; 

您现在可以在键映射中包含ALT键,其中

 
C => CMD 
M => ALT 
 
Go to End of Line: C+Right 
Go to Start of Line: C+Left 
Go to Next Word: M+Right 
Go to Previous Word: M+Left 
Select Next Word: MS+Right 
Select Previous Word: MS+Left 
Select to End of Line: CS+Right 
Select to Start of Line: CS+Left 
+0

这是非常有用的,但并没有给我所有我想要的功能。从版本5.1.0开始,如果您搜索'startup.bsh'文件中的'MacOS',还有其他几行要取消注释('KeyEventTranslator.setModifierMapping');这样做可以解决BrianHeylin的原始问题。 – 2013-12-10 18:52:34

+0

非常感谢Brian。只需在jEdit 5.3.0中添加它,就需要添加'Debug.ALT_KEY_PRESSED_DISABLED = false;'行和'Debug.ALTERNATIVE_DISPATCHER = false;'手动。 – 2015-11-04 05:07:19

3

不幸的是,Brian的调查结果与QWERTZ键盘不兼容:它禁用输入字符如管道,大括号或任何使用ALT键作为修饰符的可能性。

根据startup.bsh评论:

/*{{{ Remapping modifier keys part II */ 

/* Note if you chose to make use of the M+ (option key) prefix on MacOS, you 
* will need to disable a little piece of code: */ 
//Debug.ALT_KEY_PRESSED_DISABLED = false; 
/* Otherwise M+ will be ignored for the purposes of keyboard shortcuts. */ 

/* But if you enable this, you might find that Option+8 for example invokes your 
* macro but also inserts a bulletpoint, as per standard Macintosh keyboard 
* behavior. To disable the Option key for inserting special high ASCII 
* characters, uncomment this. Note that it has wider implications, notably 
* DROVAK keyboard shortcuts will be mapped as if the keyboard was QWERTY. */ 
//Debug.ALTERNATIVE_DISPATCHER = false; 

/*}}}*/ 

只有在取消Debug.ALT_KEY_PRESSED_DISABLED应该做的伎俩,但在这里,[1]它不会 - 我可以要么使用ALT作为改性剂的快捷方式, 作为进入字符的改性剂..现有部分也与改性剂的映射涉及:

/*{{{ Remapping modifier keys part I */ 

/* The below is the default, swap the items around to 
* change meaning of C+, A+, M+, S+. 
*/ 
//KeyEventTranslator.setModifierMapping(InputEvent.CTRL_MASK, 
// InputEvent.ALT_MASK, InputEvent.META_MASK, 
// InputEvent.SHIFT_MASK); 

/* ... and this the MacOS default: */ 
//KeyEventTranslator.setModifierMapping(InputEvent.META_MASK, /* == C+ */ 
// InputEvent.CTRL_MASK, /* == A+ */ 
// InputEvent.ALT_MASK, /* == M+ */ 
// InputEvent.SHIFT_MASK /* == S+ */); 

/*}}}*/ 

但无论设置我试图组合,我は无法使用这两个选项实现设置(ALT作为快捷键 textinput的修饰符)工作。

所以:任何提示/修复将高度赞赏。 ;-)

[1]在这里的意思是:jEdit的4.3.2 @ OSX 10.5.8(Java 1.5.0_30)与QWERTZ(德语)键盘

+0

我遇到同样的问题,使用QWERTY键盘。 :(不能输入#通过jEdit ?? – Nick 2012-03-30 16:29:49

1

一个解决方案,为我的作品:

创建一些将你需要的特殊alt字符插入到textArea中的宏(每个字符一个宏)。

然后,您可以更改设置以启用jedit的alt键(我只启用了两个属性中的第一个)。

之后,您可以为您录制的宏指定alt-shortcuts,以特殊字符与之前相同的短语插入。

之后,您可以更改文本导航的快捷方式设置以匹配mac标准,并且您仍然可以通过已定义的宏快捷键提供特殊字符。