🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.delphi.misc
Article #474

Re: How can I change/remap keys from inside my keyboard hook? (I've been searching all day...)

#474
From: Marco van de Voort
Date: Fri, 14 Jan 2005 10:22
18 lines
2453 bytes
["Followup-To:" header set to comp.lang.pascal.misc.]
On 2005-01-14, Ante Smolcic <spam@supersmola.net> wrote:
> In article <Q7MFd.81623$Lv.63812@amsnews02.chello.com>, 
> thaddy@replacethiswithmyfirstname.com says...
>> You can not use messages, because you would fall back into the hook thus 
>> creating an endless loop.
>> You should map the whole keyboard and xlat them into YOUR keyboad lay 
>> out ( do it just once when the hook is installed) and look up from the hook.
>> The thins you need are the win32 api GetKeyboardstate and 
>> SetKeyboardstate. These use very easy to handle arrays so it isnt 
>> difficult at all
>
> So if I want to create a global key re-mapping, what do you suggest when 
> to call these functions? On each KeyboardProc invocation?

Could you please _significantly_ reduce the amount of NGs ? Thank you.

Specially since Delphi is offtopic in c.l.p.borland, and c.l.p.misc
Technical Details
Message-ID: <slrncuf7bf.1b7q.marcov@turtle.stack.nl>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!border2.nntp.ams.giganews.com!nntp.giganews.com!feeder1.cambrium.nl!feed.tweaknews.nl!humbolt.nl.linux.org!news.nl.linux.org!surfnet.nl!news.tue.nl!not-for-mail
References: <1105557699.667151.276930@z14g2000cwz.googlegroups.com> <Q7MFd.81623$Lv.63812@amsnews02.chello.com> <MPG.1c51bae45bf691c998a2ce@news.iskon.hr>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10baee,797761edfabd18bb
X-Google-Thread: 111659,797761edfabd18bb
X-Google-Thread: 10261c,797761edfabd18bb
X-Google-Thread: 1091e5,797761edfabd18bb
X-Google-Thread: 113dfb,797761edfabd18bb
X-Google-Attributes: gid10baee,gid111659,gid10261c,gid1091e5,gid113dfb,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!border2.nntp.ams.giganews.com!nntp.giganews.com!feeder1.cambrium.nl!feed.tweaknews.nl!humbolt.nl.linux.org!news.nl.linux.org!surfnet.nl!news.tue.nl!not-for-mail
From: Marco van de Voort <marcov@stack.nl>
Newsgroups: comp.lang.pascal.delphi.misc,comp.lang.pascal.borland,comp.lang.pascal.misc,borland.public.delphi.winapi,comp.os.ms-windows.programmer.win32
Subject: Re: How can I change/remap keys from inside my keyboard hook?  (I've  been searching all day...)
Followup-To: comp.lang.pascal.delphi.misc
Date: Fri, 14 Jan 2005 10:22:39 +0000 (UTC)
Organization: Eindhoven University of Technology, The Netherlands
Lines: 18
Message-ID: <slrncuf7bf.1b7q.marcov@turtle.stack.nl>
References: <1105557699.667151.276930@z14g2000cwz.googlegroups.com> <Q7MFd.81623$Lv.63812@amsnews02.chello.com> <MPG.1c51bae45bf691c998a2ce@news.iskon.hr>
NNTP-Posting-Host: turtle.stack.nl
X-Trace: news.tue.nl 1105698159 14405 131.155.140.132 (14 Jan 2005 10:22:39 GMT)
X-Complaints-To: abuse@tue.nl
NNTP-Posting-Date: Fri, 14 Jan 2005 10:22:39 +0000 (UTC)
User-Agent: slrn/0.9.8.1 (FreeBSD)