[fpc-pascal] keyboard layout.
We are having a problem with keyboard layouts in the keyboard unit in windows. Currently it is automatically assumed that both alt keys differ. So this is a small poll: What is your Windows keyboardlayout, and are your two alt keys different (ALT-GR system)? Me: Layout: ALT-GR ? US no ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] keyboard layout.
> We are having a problem with keyboard layouts in the keyboard unit in windows. > Currently it is automatically assumed that both alt keys differ. > > So this is a small poll: > > What is your Windows keyboardlayout, and are your two alt keys different > (ALT-GR system)? > > Me: > > Layout: ALT-GR ? > US no Florian dug up some C++ code that I tried to convert. Could sb try to run this on his windows machine, and check if the ALT-GR status is detected correctly. Please also mention your windows version, since I found notes here and there that some aspects of keyboardlayouts are NT specific. program printlayout; {$mode delphi} Uses SysUtils,Windows; // Checks if the right-hand ALT key is used as a 2nd shift key var hklold: HKL = 0; var HasAltGr : Boolean = false; procedure CheckAltGr; var ahkl : HKL; i: integer; begin HasAltGr:=FALSE; ahkl:=GetKeyboardLayout(0); if (hklOld<>ahkl) then Begin hklOld:=ahkl; i:=$20; while i<$100 do begin // // For keyboard layouts that use the right-hand ALT key as ashift key // (for example, the French keyboard layout), the shift state is // represented by the value 6, because the right-hand ALT key is // converted internally into CTRL+ALT. // if (HIBYTE(VkKeyScanEx(chr(i),ahkl))=6) then begin HasAltGr:=TRUE; break; end; inc(i); end; end; end; begin writeln(hexstr(getkeyboardlayout(0),8)); CheckAltGr; if HasAltGr then writeln(' Has altgr') else writeln('shouldn''t have alt-gr'); end. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC on ARM (eg Zaurus)
On Saturday 20 November 2004 11:53 pm, Den Jean wrote: > it crashes > when compiled for ARM > I also debugged it on the zaurus with gdb. On clicking the button that is attached to AppQuit I get: Program received signal SIGILL, Illegal instruction. $000a0e84 in U_SYSUTILS_UPPERCASETABLE () I also checked wether method.func corresponds to @MyClass.AppQuit and method.data to MyClass. So I added this pascal code. -- QButton_clicked_Event(Method):=MyClass.AppQuit; writeln('@MyClass.AppQuit:',IntToHex(integer(@MyClass.AppQuit),4)); writeln('@Method.code:',IntToHex(integer(Method.code),4)); writeln('MyClass:',IntToHex(integer(MyClass),4)); writeln('@Method.data:',IntToHex(integer(Method.data),4)) -- A screenshot for fun of gdb debugging this fpc program on the zaurus is here: http://users.pandora.be/Jan.Van.hijfte/qtforfpc/test01.png I hope this helps. kind regards, Jan ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal