Changing the function keys (ctrl,alt shift) F1..F12

Changing the function keys (ctrl,alt shift) F1..F12

Post by S1NP » Thu, 06 Dec 2007 07:33:00


how can i put some text into these key by C# code ?

In the old days you could do it by the PROMPT command i DOS but it seems NOT
to work any more - the "change key" facility has disappeared.

Can I do the change from C# so that it will stay changed when I start
another program ?

Best regards
KSor, Denmark
 
 
 

Changing the function keys (ctrl,alt shift) F1..F12

Post by Nicholas P » Fri, 07 Dec 2007 00:19:41

KSor,

What do you mean you want to put some text? Is it that when you hit
those buttons, you would get some text inserted into your application, no
matter what the app? Something tells me that you can't really do this (at
least in windows apps) as every windows app is going to process those keys
individually (for example, hitting a key in one app will have a completely
different effect than hitting the same key in another app).

Or are you trying to do something else?


--
- Nicholas Paldino [.NET/C# MVP]
- XXXX@XXXXX.COM

 
 
 

Changing the function keys (ctrl,alt shift) F1..F12

Post by S1NP » Fri, 07 Dec 2007 00:28:04

Yes thats what I want - but you say it can't be done - :-(

Thanks !
 
 
 

Changing the function keys (ctrl,alt shift) F1..F12

Post by Nicholas P » Fri, 07 Dec 2007 01:13:30


I wouldn't say that it can't be done, but you would have to have a
general interface for inserting text into any arbitrary application. At
best, you could guess how this could be done (through automation, sending
the WM_SETTEXT windows message, through the accessibility APIs), but it's
not easy.

You might be able to do something using the clipboard though, like
telling the application to paste the contents from the clipboard. Of
course, you should be careful not to overwrite what is currently on the
clipboard.

--
- Nicholas Paldino [.NET/C# MVP]
- XXXX@XXXXX.COM