On Thu, 18 Oct 2007 01:20:31 +0200 Michalis Kamburelis <[EMAIL PROTECTED]> wrote:
> Frank McCormick wrote: > > Resending because of some changes in my results. > > > > > > I am having a tough time using the keyboard unit under Linux. Please tell me > > whats wrong with this code: > > > > ( var section cut out) > > > > Begin > > InitKeyBoard; > > Repeat > > K:=pollKeyEvent; > > if k <>0 > > then > > begin > > k:=getkeyevent; > > k:=translatekeyevent(k); > > if isfunctionkey(k) > > then > > case k Of > > Replace above line with "case GetKeyEventCode(k) Of". To compare with > constants like kbdF1 and such, you have to extract event code from > TKeyEvent value by GetKeyEventCode (somewhat analogous to > GetKeyEventChar that you use below). Bingo. That did it. Is it just me or is this keyboard stuff unnecessarily complicated under Linux ? Thanks for spotting that!! Cheers Frank -- Change the world one loan at a time - visit Kiva.org to find out how _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal