jEdit Community - Resources for users of the jEdit Text Editor
Problem with CTRL+char combinations
Submitted by Naturo on Monday, 23 April, 2007 - 09:31
I have a problem with Jedit: whenever I type CTRL+some_character, it executes the command corresponding to the combination (when such command exists) but it also inserts the character into the current position in the text.

E.g. when I type CTRL+x it deletes the selected text but it inserts the character 'x'. If I type CTRL+f it opens the Find&Replace dialogue window but it also inserts the character 'f' into the text.

I have this problem only with Jedit, things work fine when I use other editors, including Java-based editors like Netbeans IDE editor.

I am using Jedit 4.2final on Fedora 3, with Sun jdk1.5.10 (but I have the same problem when switching to jdk1.6 or jdk1.4).

Here is what happens when using Utilities->Troubleshooting->Keyboard Tester:
If I type CTRL+x for instance, it prints "C+x x" in the textefield of the "Specify Shortcut" dialogue window, and the following event report is printed in the text window:
Event KEY_PRESSED,keyCode=0x58,keyChar=0x78,modifiers=0x2 passed
==> Translated to C<0,78>
Event KEY_TYPED,keyCode=0x0,keyChar=0x78,modifiers=0x2 passed
==> Translated to <0,78>
Event KEY_RELEASED,keyCode=0x58,keyChar=0x78,modifiers=0x2 passed
Event KEY_RELEASED,keyCode=0x11,keyChar=0xffff,modifiers=0x0 filtered

Thanks in advance for any help!

Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
I've found the cause: the pro
by Naturo on Tue, 24/04/2007 - 14:40
I've found the cause: the problem is actually related to jdk1.6

(Actually there was a forgotten JAVA_HOME variable in my .cshrc that pointed to jdk1.6 so when I changed the DEFAULT_JAVA_HOME in the jedit launching script to jdk1.4 or jdk1.5 it was not taken into account, i.e. jdk1.6 was still used to run jedit)

So things works fine with sun java 1.4 and java 1.5, but not with 1.6 which seems to be incompatible with jedit4.2final as far as handling of keyboard events is concerned.
I have just tested jedit4.3pre9 with jdk1.6 and found the same problem. Anyway, now I can get rid off this, using jdk1.5

User login
Browse archives
« April 2024  
MoTuWeThFrSaSu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   82348
Context Free Art (*.cfdg)   0.31   46055
JBuilder scheme   .001   18495
BBEdit scheme   1.0   18116
ColdFusion scheme   1.0   18024
R Edit Mode - extensive version   0.1   17473
Advanced HTML edit mode   1.0   16206
Matlab Edit Mode   1.0   16068
jEdit XP icons   1.0   15229
XP icons for jEdit   1.1   14293