LiMinggang / madedit-mod

MadEdit-Mod is a cross platform Text/Hex editor(based on the madedit project @ sourceforge)
GNU General Public License v3.0
124 stars 27 forks source link

some greek symbols that require the Alt+ compination don't get created #214

Closed nikoss closed 8 years ago

nikoss commented 8 years ago

When typing in Greek the following don't get created, although they ought to:

" RightAlt+> " --------------> " » "
" RightAlt+< " --------------> " « "
" RightAlt+[the q key] " ----> " · "
" RightAlt+[the r key] " ----> " ® "

and possibly more key combination

But this one works:

" RightAlt+Ε " --------------> " € "

I have checked it with two different fonts; the same problem.

And I use the "Greek extended" keyboard layout, in Mageia 5, with madedit-mod-0.4.4-1.i586_Mageia4.1_Fedora22.rpm

LiMinggang commented 8 years ago

Did this work in the previous releases? What is the latest version that worked for you? Would you please give me some information about Greek input? Eg, How to enable it? Does it need some special input software similar to Chinese input?

I only have a VMWare VM of Mageia 4.1 which is the platform to build the release. Not sure if I can reproduce the issue with it.

LiMinggang commented 8 years ago

" RightAlt+> " --------------> " » " " RightAlt+< " --------------> " « " This issue might introduced by I used "Alt-." and "Alt-," as the shortcut for Go Back and Go Forward. I found the "," and "." is the same pos as "<" and ">" in my Keyborad. Please re-assign keys for Go Back and Go Forward.

LiMinggang commented 8 years ago

No clue for the below: " RightAlt+[the q key] " ----> " · " " RightAlt+[the r key] " ----> " ® "

nikoss commented 8 years ago

I found the "," and "." is the same pos as "<" and ">" in my Keyborad.

Yes, you are right. It's just that "," and "." are so small, so I always think of "<" and ">". But of course, you must press "Shift+," to produce "<" . I should have written: " RightAlt+. " --------------> " » " " RightAlt+, " --------------> " « "

" RightAlt+> " --------------> " » " " RightAlt+< " --------------> " « " This issue might introduced by I used "Alt-." and "Alt-," as the shortcut for Go Back and Go Forward. .... Please re-assign keys for Go Back and Go Forward.

I tried that. The problem is still there.

nikoss commented 8 years ago

Did this work in the previous releases? What is the latest version that worked for you?

I don't remember. I will have to uninstall/reinstall madedit-mod to check that.

Would you please give me some information about Greek input? Eg, How to enable it?

In Mageia you go to Mageia's Control Center (command: mcc ) --> Hardware --> Set up Keyboard Layout --> Keyboard Layout --> and choose Greek (http://docteam.mageia.nl/en/MCC/content/keyboarddrake.html#d4e1138)

Alternatively you use your Window Manager's control centre, and go to keyboard options. KDE command: systemsettings Mate command: mate-control-center

Again I note that I use the "Greek extended" layout, if available. Otherwise, I choose the simple "Greek" layout. Not the polytonic (with extra letter accents).

Does it need some special input software similar to Chinese input?

Not, as far as I know.

nikoss commented 8 years ago

Just checked older versions of madedit-mod and madedit. The results:

problem madedit-mod-0.4.4-1.i586_Mageia4.1_Fedora22.rpm madedit-mod-0.4.0-1.i586_Mageia4.1_Fedora22.rpm madedit-mod-0.3.6-1.i586_Mageia4.1_Fedora22.rpm

no problem madedit-0.2.9-1.i386.rpm

Some guessing... Is it probable that madedit-mod doesn't distinguish between Left and Right Alt keys?

LiMinggang commented 8 years ago

The major difference between madedit and madedit-mod on this issue is that I ported it to GTK3 which was not supported by madedit. So, something might be broken because of this change.

On Wed, Jul 20, 2016 at 1:41 AM, nikoss notifications@github.com wrote:

Just checked older versions of madedit-mod and madedit. The results:

problem madedit-mod-0.4.4-1.i586_Mageia4.1_Fedora22.rpm madedit-mod-0.4.0-1.i586_Mageia4.1_Fedora22.rpm madedit-mod-0.3.6-1.i586_Mageia4.1_Fedora22.rpm

no problem madedit-0.2.9-1.i386.rpm

Some guessing... Is it probable that madedit-mod doesn't distinguish between Left and Right Alt keys?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/LiMinggang/madedit-mod/issues/214#issuecomment-233709740, or mute the thread https://github.com/notifications/unsubscribe-auth/AEn2HKmrLNgo5ulmf4k94rD89l8zEj0Uks5qXQwxgaJpZM4JOSNf .

LiMinggang commented 8 years ago

Just tried to switch the keyboard following your instructions. I could not insert any chars with the Alt. I think the Alt+key should be translated by some kind of software installed in your system. MadEdit-Mod can get the key combination, that is, 0x2C(44, for ',') with Alt flag on. However, it don't know the mean. It's an editor anyway.

I also tried MadEdit-0.2.9-1386.rpm. It's the same.

The other evidence is that Alt-E should be the shortcut for Edit menu(regardless the right one or left one). However, you said it could generate " € ". It seemed that someone else caught the key event and translated it to " € " before MadEdit-Mod.

Do you want try an GTK2 version?

nikoss commented 8 years ago

Some more testing...

I tried madedit-mod 4.4, windows 32bit version, under Wine, in Linux, and I could not type any Greek characters. So, I logged in my Microsoft Windows installation, and here are the results:

in Windows 7 Starter...

MadEdit-Mod0.4.4_X86.7z -----> no Greek at all MadEdit-Mod0.3.6_x86.7z -----> no Greek at all

MadEdit-0.2.9.1-win32-bin.7z ---> I could type all the Greek characters that I 've tried to. Only notice is that some are arranged differently, than in Linux. For example, the " « " symbol is produced by " RightAlt + [ " .

nikoss commented 8 years ago

I could not insert any chars with the Alt

Have you tried it with another application in Mageia?

It seemed that someone else caught the key

Should not the problem appear in other application in my system then? Only Madedit-mod has this issue (as far as I know).

Do you want try an GTK2 version?

If you think it could help.

LiMinggang commented 8 years ago

It's wired. Do you have any idea that how to enable greek input on Windows 7? I need more time to investigate the issue. I've no idea what would change the behavior of the input system.

On Thu, Jul 21, 2016 at 3:22 AM, nikoss notifications@github.com wrote:

I could not insert any chars with the Alt

Have you tried it with another application in Mageia?

It seemed that someone else caught the key

Should not the problem appear in other application in my system then? Only Madedit-mod has this issue (as far as I know).

Do you want try an GTK2 version?

If you think it could help.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/LiMinggang/madedit-mod/issues/214#issuecomment-234054103, or mute the thread https://github.com/notifications/unsubscribe-auth/AEn2HDT6gzzjo6kg8ZhX_SioFkKuDpbEks5qXnWBgaJpZM4JOSNf .

LiMinggang commented 8 years ago

After switch to Greek Polytonic on Win7 64, I still could not tell the difference between MadEdit and MadEdit-Mod. image 1

LiMinggang commented 8 years ago

Will do more investigation on the code details.

What's the detailed steps to have a different result? What's the keyboard layout you used on Windows 7? On my window 7 64 bit, I can input some special greek chars by using Greek Polytonic/Greek with LeftAlt. However, I could not input anything with RightAlt or Alt+. or Alt+,. Tried with MadEidit 0.2.9.1 win32. It's the same.

Tried with Win7 64 English and Simplified Chinese

nikoss commented 8 years ago

I switched from Microsoft Windows to Linux, in 2007. So, I don't remember much about Microsoft's OS. And as I said, the key combinations are somewhat different, between Microsoft and Linux.

Maybe, in the end it is a hardware issue. My computer is a Lenovo s10-3t netbook. Unfortunately I don't have another computer to compare the keyboards with Madedit-mod.

LiMinggang commented 8 years ago

Not sure if it was a hardware issue. You said it did not work under Mageia. I double checked the code and found that it should not be the issue of MadEdit-Mod itself at least. You are developer too, right? So below is the code to handle key input, that is OnChar event in MadEdit.cpp Windows image 2 Linux image 3

The change for this is because of wxWidgets 3.x(Left side). And I loosed the check actually.

If the condition check got true, it would call the process function of MadEdit-Mod/MadEdit. Maybe it's the difference between GTK 2 and 3?

nikoss commented 8 years ago

I 've got too bad memory to be a developer. I am just the translator. I can't offer any help with the code.

nikoss commented 8 years ago

Another test I did was with Kehra, a text editor created with wxwidgets ( http://www.wxwidgets.org/about/screenshots/ http://kephra.sourceforge.net/site/en/home_news.shtml ).

I unpacked "Kephra-0.4.3-win-en.exe" (this version is the "testing-recommended-one" and seems to be from 2009: https://sourceforge.net/projects/kephra/files/Kephra (testing)/0.4.3/ ). Then run Kehra under Wine (32bit), in my Mageia (32bit).

And this was the result: I could type Greek, except for those "special" characters that require the RightAlt combination.

So, with no absolute certainty, I think we can say that this bug is wxwidgets related.

LiMinggang commented 8 years ago

It's also my guess. Something is broken in wxWidgets 3.x. It's hard for me to figure it out because I'm not familiar with Greek. Could you please help on this or at least give me details on how to make difference between madedit-0.2.9 and madedit-mod. I'll try more on Mageia.

nikoss commented 8 years ago

I asked, on the greek forum of Mageia Linux, for testers. Dglent was kind enough to reply. He said madedit-mod didn't work correctly, with greek language, on his Mageia 5, 64bit, system. So we know, for sure now, that it is not just my computer.

I also took a look at Poedit's code. As expected, I didn't understand anything: https://github.com/vslavik/poedit/blob/master/src/text_control.cpp https://github.com/vslavik/poedit/blob/master/src/text_control.h It seems to me that the keyboard signals come to the application (madedit-mod or poedit) and the application chooses to either accept them, raw, as they are, or to change them, or even ignore them, or ignore some of them. Maybe that's where the problem is. But, again, I might be misleading, because I have no idea what I am talking about.

Could you please help on this or at least give me details on how to make difference between madedit-0.2.9 and madedit-mod.

Apart from testing, and... guessing, I don't feel that there is much more I can do.

As for Madedit vs Madeit-Mod: when I press, together, RightAlt and , I get « in Madedit. I get nothing in Madedit-Mod (with Greek keyboard layout, in Mageia).

By the way, this command shows my keyboard settings:

[bash 4.3]$ setxkbmap -query
rules:      evdev
model:      ibm_spacesaver
layout:     us,gr(extended)
options:    grp:caps_toggle,grp_led:scroll,compose:rwin
[bash 4.3]$ 

(source: http://unix.stackexchange.com/questions/12072/how-do-i-get-current-keyboard-layout)

LiMinggang commented 8 years ago

Not sure if I could make any progress on this issue because I did not make a difference between madedit and madedit-mod. I checked the code of poledit. It only adds a KeyDown event. MadEdit used a wired way that I did not understand but follow it. It ported some code from wxWidgets, ie. the windows.cpp for GTK2. I followed the way for GTK3. Will check the code of wxWidgets.

Still need your help to tell me how to input Greek under Mageia

LiMinggang commented 8 years ago

The output of 'setxkbmap -query' on my VMWare is almost the same with you except the model is 'pc101'--my keyboard.

I just found a different behavior between MadEdit and MadEdit-mod on Windows 7 64bit(sorry for backing to windows again----'cause I did not change a bit on the char handler of MadEdit on Windows.) There is one key can be input in Mad but not Mod, that is RightAlt+E. I checked the code and found that "ucs4==key" is not true anymore.( int key = evt.GetKeyCode(); ucs4_t ucs4 = evt.GetUnicodeKey();). "ucs4==key" if from MadEdit. So, I can sure the issue was introduce by MadEdit(Not by MadEdit-Mod).

The code was not work with wxWidgets 3.x which is to be fixed.

LiMinggang commented 8 years ago

However, the problem is that I could not reproduce the RightAlt+, or . issue. It does not work with either MadEdit or MadEdit-Mod.(No char event generated by wxWidgets)

LiMinggang commented 8 years ago

OK, I finally managed to input «» under Greek keyboard on my Windows 7.(MadEdit-Mod 0.4.4) Use RightAlt+[, ] instead of RightAlt+, or . I'm not sure It's the key combination under Mageia. Please have a try.

nikoss commented 8 years ago

Yes, the key combination is different between Microsoft's Windows 7 and Mageia. (I have already mentioned it, but I guess it went unnoticed

Only notice is that some are arranged differently, than in Linux. For example, the " « " symbol is produced by " RightAlt + [ " .

Mageia -----> RightAlt+, or . ---> « » Microsoft --> RightAlt+[ or ] ---> « »

LiMinggang commented 8 years ago

Confirmed the issue under Mageia.

On Wed, Aug 3, 2016 at 4:45 PM, nikoss notifications@github.com wrote:

Yes, the key combination is different between Microsoft's Windows 7 and Mageia. (I have already mentioned it, but I guess it went unnoticed

Only notice is that some are arranged differently, than in Linux. For example, the " « " symbol is produced by " RightAlt + [ " .

Mageia -----> RightAlt+, or . ---> « » Microsoft --> RightAlt+[ or ] ---> « »

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/LiMinggang/madedit-mod/issues/214#issuecomment-237179317, or mute the thread https://github.com/notifications/unsubscribe-auth/AEn2HE2L48VJeIqjtAZ0kZMMRylK9Xavks5qcFUogaJpZM4JOSNf .

LiMinggang commented 8 years ago

I removed the wired code of MadEdit of GTK. Would you mind to try a build for Mageia?

  1. Try the RightAlt Keys(I've tried but I'm not a native speaker of Greek. Need you to verify if there was issues.)
  2. Try MadEdit-Mod running with some Instant Message clients to see if the cursor/caret was displayed correctly.

Thanks! The build would be in the Preview folder.

nikoss commented 8 years ago

I just saw a "madedit-mod0.4.4.tar.gz" file in the Preview folder. I hope you don't think of me as able to compile it, because I have no clue on how to do that.

LiMinggang commented 8 years ago

It's a tar ball of debug version binary. Just unpack it with tar, eg, tar -xvf . Then try it with ./madedit

nikoss commented 8 years ago

Tried it and it works fine!

©«»€®£€°±

(As a side note, at least one key combinations works differently, than in some other application. But I wouldn't know who's right. Madedit-Mod or, for example, IceApe ? Maybe they both are right. Again, I don't think that the following needs to be fixed. I just write it down, to avoid any confusion:

with Greek extended keyboard layout Madeit-Mod -------------------> result <------------ IceApe RightAlt+Shift+r --------------> ® <----------------- RightAlt+r RightAlt+Shift+[2 times ; ] --> ¨ <------------------ [couldn't find it] )

At last, I will be able to use Madedit-mod with It's All Text! .

LiMinggang commented 8 years ago

OK. Good to know it. Will use it as the fix for now. Please open issues if you found bugs.