🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#473
From: Ante Smolcic
Date: Fri, 14 Jan 2005 10:18
16 lines
2339 bytes
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?


-- 
Volume six, ha, ha, ha.
Technical Details
Message-ID: <MPG.1c51bae45bf691c998a2ce@news.iskon.hr>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!t-online.de!newsfeed.t-com.hr!Iskon!not-for-mail
References: <1105557699.667151.276930@z14g2000cwz.googlegroups.com> <Q7MFd.81623$Lv.63812@amsnews02.chello.com>

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!news4.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!t-online.de!newsfeed.t-com.hr!Iskon!not-for-mail
From: Ante Smolcic <spam@supersmola.net>
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...)
Date: Fri, 14 Jan 2005 11:18:29 +0100
Organization: Nevenkin bazen
Lines: 16
Message-ID: <MPG.1c51bae45bf691c998a2ce@news.iskon.hr>
References: <1105557699.667151.276930@z14g2000cwz.googlegroups.com> <Q7MFd.81623$Lv.63812@amsnews02.chello.com>
NNTP-Posting-Host: 213.191.151.54
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-2"
Content-Transfer-Encoding: 7bit
X-Trace: sunce.iskon.hr 1105697992 18044 213.191.151.54 (14 Jan 2005 10:19:52 GMT)
X-Complaints-To: abuse@iskon.hr
NNTP-Posting-Date: 14 Jan 2005 10:19:52 GMT
User-Agent: MicroPlanet-Gravity/2.70.2067
X-Face: v|By=kg`U$xz-'o4Wb@;n8J6z`+d<5v?*qe/xLT$\w7<w)oMFn72):iK7WFnJ}inP`A3M{k(<dItWED4S0VzpM-UM_ZLQ>]USN=bs+$ss`D3jXU@DwTwYqwG(0T/urD#~~,WX1'dZ?TJ5`~_5P@/Pj'(4!"FAtNaJ@&x"7&-tDS3A|.2w|Qh5Ad+