keyboard layout

Please post bug reports for earlier versions of Help & Manual (3 and 4) here, along with reports for TNT.

Moderators: Alexander Halser, Tim Green

Post Reply
User avatar
Pavel Faltejsek
Posts: 8
Joined: Wed Sep 11, 2002 9:38 am
Location: Hradec Králové

keyboard layout

Unread post by Pavel Faltejsek »

I have a problem with keyboard layouts in H&M.
I am using czech layout with QWERTY (00010405)and english layout (00000409)
I am switching between layouts wih Alt+Shift shortcut
I have default keyboard in Project Properties

Now I start write
zz {switch}zz{switch}zz

and I got "zzzzzy"
after last z, HM installs default czech keyboard layout with german (ZY) layout (00000405)

workaround is : go to Project properties and close the dialog
after all keyboard layout switches

If I know, richedit is responsible for that strange behavior
IMF_AUTOKEYBOARD in EM_SETLANGOPTIONS

Is there any possibility to make some checkbox to switch off IMF_AUTOKEYBOARD ?
mahris
Posts: 9
Joined: Fri Nov 22, 2002 12:03 pm

Keyboard layout

Unread post by mahris »

Hi Pavel,

It is really a very serious bug, which forces me to choose another help authoring tool (I cannot work with my 00030426, HM always turns into 0000426).

However, I have doubt about your explanation. I made some tests on RichEdit with IMF_AUTOKEYBOARD, and it chooses a correct keyboard, no problem.

IMO, the problem is an incorect use of LoadKeyboardLayout (I see it in HelpMan imports list).

Really, I absolutely cannot imagine any reason to use LoadKeyboardLayout in a real application. ActivateKeyboardLayout - yes, it is a good service. But Load - I absolutely do not understand the logics of developers.

However, if this command is issued, it should be used correctly, with all flags recommended in MS help.

Sincerely,
Mahris
mahris
Posts: 9
Joined: Fri Nov 22, 2002 12:03 pm

Unread post by mahris »

I made a quick crack to have ability to work.

I found text "LoadKeyboardLayoutA" in Helpman.exe (offset 2abf50) and changed it into "GetWindow", filling the rest part with zeroes.
GetWindow called with incorrect arguments in most cases returns 0, and it is enough to avoid the disruptive effect of the HM programmers activities.

I hope that HM authors in the next version will understand that LoadKeyboardLayout is a Control Panel function and a stealthy use of if without strictly expressed users accept is an irreverance to the user.

Mahris
Post Reply