ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA Prevent/allow specified keypresses to be received by a program?

<< < (2/3) > >>

appyface:
Could you please give some examples?

Also, i think that depens on what level does that other program you mentioned scan the keyboard, but i think this might be doable.
-jgpaiva (February 24, 2008, 12:12 PM)
--- End quote ---
The program reacts to all key releases, sometimes in a way that is not desirable to me.  Unforunately I cannot configure the program.  There are some keys which are action keys in my specific context (enter, function keys, combos of shift-fkey or ctrl-shift-fkey, alt-fkey, alt-shift-fkey) that I want the program to see.  But I do not want the program to see and react to letters and numbers (with or without the shift key) arrows, backspace, tab, insert, home, page up/down, punctuation.  These are "non-action" keys in my context and I don't want the program to see these and therefore it will not react to these.

Hope that makes sense?

Thanks for your response and regards,
--appyface

jgpaiva:
That means i probably got it wrong.

ProgA <- program that scans the keyboard
ProgB <- program where you're now working

You want to be working in progB, and want progA to only react when you press enter,function keys, alt-fkey, etc, but not letters and numbers and such. Is this right?

If so, it sounds damn hard to do, can't you use an alternative for progA? What exactly does it do?

lanux128:
EDIT: I found the site for AutoHotKey, and will read up.  I am unclear, though, how this script would work?  Do I just loop it forever until I manually terminate it, so it will continually monitor and catch the keystrokes I don't want?-appyface (February 26, 2008, 02:46 AM)
--- End quote ---

i'm copy-pasting these from the AHK help-file..

#IfWinActive keyword creates context-sensitive hotkeys and hotstrings. Such hotkeys perform a different action (or none at all) depending on the type of window that is active or exists.

Also, multiple scripts can be running simultaneously, each with its own tray icon but AHK scripts are run-on-demand type unless there are timers, loops or the keyword #Persistent.

#Persistent keeps a script permanently running (that is, until the user closes it or ExitApp is encountered).
HTH. btw, myself or jgpaiva don't mind creating a skeleton script for you so that it is easier for you to learn and add your commands but as jgpaiva mentioned, we need for more info. ;)

appyface:
Thanks for help.  I tried to use the AHK but the program I want to intercept the keyboard for, does not have a window, it is a background process.  I didn't see in the command list for AHK on their website, how to target a process?  So I'm thinking AHK can't work.

I'm not sure what else you need to know about the program I'm trying to intercept?  What more information do you need?  Other programs are not involved except to the extent that I do not want to shield keypress (key *release* event, actually) from anything but this one program, so it is not a complete system block but app-specific.

As I mentioned, the program is not intended as a keylogger or spy but it behaves similarly to those.  It is listening for key *release* events and documenting what is typed by taking actions such as launching another program.  I really like this program but it is old and the author has not responded to any emails so he/she may no longer be available.  I don't need many of these actions to be performed on simple typing (my "non-action" key release events).  It isn't huge to just live with it but it would be nice if I could front-end the program with something that let only my desired "action" key release events get through to the program.

Looks like this is taking way more of your time than I ever intended.  I thought this might be something quick and also useful for other purposes.  My apologies. 

  --appyface

jgpaiva:
Sorry, i didn't ask out of curiosity, my intention wasn't to seem nosey.
I asked because the good people of DC might actually know a better replacement to your program, solving your trouble with it, see what i mean?

Yes, from your description, it does sound like something that can't be done with ahk.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version