flat assembler
Message board for the users of flat assembler.

Index > Windows > disable keys?

Author
Thread Post new topic Reply to topic
windwakr



Joined: 30 Jun 2004
Posts: 827
windwakr 24 Jul 2004, 01:31
how do you get keypresses before windows does then if its a key you dont want pressed dont send it to windows?

_________________
----> * <---- My star, won HERE
Post 24 Jul 2004, 01:31
View user's profile Send private message Reply with quote
silkodyssey



Joined: 02 Oct 2003
Posts: 198
Location: St.Vincent & the Grenadines
silkodyssey 24 Jul 2004, 02:04
One way would be to install a system wide hook and return a non zero value (for messages you don't want to be passed on) from the hook procedure so that the destination window does not receive the message. If you're not familiar with windows hooks you can look at iczelion's example.
http://spiff.tripnet.se/~iczelion/tut24.html
It demonstrates a mouse hook but the process is similar for keyboard hooks.

_________________
silkodyssey
Post 24 Jul 2004, 02:04
View user's profile Send private message MSN Messenger Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1150
Location: Russian Federation
comrade 24 Jul 2004, 03:22
alternatively you can write a keyboard filter driver
but then that will not be able to prevent keypresses from power management buttons (power/(sleep/standby)/wake)
for those buttons it is even necessary to modify PS/2 driver!

_________________
comrade (comrade64@live.com; http://comrade.ownz.com/)
Post 24 Jul 2004, 03:22
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
coconut



Joined: 02 Apr 2004
Posts: 326
Location: US
coconut 24 Jul 2004, 04:20
Post 24 Jul 2004, 04:20
View user's profile Send private message Reply with quote
windwakr



Joined: 30 Jun 2004
Posts: 827
windwakr 24 Jul 2004, 17:33
doesnt work on my computer (win98)
Post 24 Jul 2004, 17:33
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.