468,772 Members | 2,318 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,772 developers. It's quick & easy.

Replace the keys on the keyboard

Hi

Can anyone help. I would like to replace the keys on the PC keyboard. For
example, when I press Q button it displays A on the screen in any programs
(MS Words, Note, Lotus....). And also when I press Ctrl + W button, it
displays G on the screen. I would like to make the keyboards configurable.

Should I write a Windows Service? Any suggestions would really appreciate.

Please help. Thanks.
Regards
Melson
Jun 13 '06 #1
4 3812
"Melson" <we****@hotmail.com> wrote:
Can anyone help. I would like to replace the keys on the PC keyboard. For
example, when I press Q button it displays A on the screen in any programs
(MS Words, Note, Lotus....). And also when I press Ctrl + W button, it
displays G on the screen. I would like to make the keyboards configurable.

Should I write a Windows Service? Any suggestions would really appreciate.


Three suggestions for you to look at:

(1) SetWindowsHookEx() with WH_KEYBOARD_LL for a low-level keyboard hook
(this requires an application with a message loop running on the desktop
of the user it affects).

(2) Write a Windows keyboard layout with the MS Keyboard Layout Creator
(http://www.microsoft.com/globaldev/tools/msklc.mspx).

(3) Install a keyboard filter driver into the kernel, and have your
configuration program communicate with it somehow. Check out
http://www.sysinternals.com/Utilities/Ctrl2Cap.html for techniques for
this (source is on the site, DDK needed IIRC). I wouldn't recommend this
method, since it could compromise the stability of the system.

I personally use (1), an application I wrote to simulate the Dvorak
keyboard layout for use with public PCs which don't allow permission to
change the keyboard layout. The catch with (1) is that some of the key
information you get depends on the current keyboard layout.

-- Barry

--
http://barrkel.blogspot.com/
Jun 13 '06 #2
If you are only building a simple project using a winform. I would suggest
you to use the MenuStrip control with the ShortcutKeys preperty. Somehow
hide the menu if you want.

chanmm

"Melson" <we****@hotmail.com> wrote in message
news:el**************@TK2MSFTNGP02.phx.gbl...
Hi

Can anyone help. I would like to replace the keys on the PC keyboard. For
example, when I press Q button it displays A on the screen in any programs
(MS Words, Note, Lotus....). And also when I press Ctrl + W button, it
displays G on the screen. I would like to make the keyboards configurable.

Should I write a Windows Service? Any suggestions would really appreciate.

Please help. Thanks.
Regards
Melson

Jun 13 '06 #3
"Melson" wrote:
Can anyone help. I would like to replace the keys on the PC keyboard. For
example, when I press Q button it displays A on the screen in any programs
(MS Words, Note, Lotus....). And also when I press Ctrl + W button, it
displays G on the screen. I would like to make the keyboards configurable.


You can use a global keyboard hook WH_KEYBOARD_LL to monitor for keyboard
input across all applications. When you receive a specific key event in
which you are interested, you can suppress that event, then send your own
keyboard event.

We offer a .NET component FREE for non-commercial use that will handle all
of this for you:

http://www.mini-tools.com/goto/input

--
Timm Martin
Mini-Tools
..NET Components and Windows Software
http://www.mini-tools.com

Jun 13 '06 #4
Hi Everyone

Thanks very much for your helpful suggestions. I'll do a search and start
working on that. Thanks.

Regards
Melson
"Melson" <we****@hotmail.com> wrote in message
news:el**************@TK2MSFTNGP02.phx.gbl...
Hi

Can anyone help. I would like to replace the keys on the PC keyboard. For
example, when I press Q button it displays A on the screen in any programs
(MS Words, Note, Lotus....). And also when I press Ctrl + W button, it
displays G on the screen. I would like to make the keyboards configurable.

Should I write a Windows Service? Any suggestions would really appreciate.

Please help. Thanks.
Regards
Melson

Jun 15 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by skearney | last post: by
13 posts views Thread by Steve Jorgensen | last post: by
5 posts views Thread by nx-2000 | last post: by
2 posts views Thread by Marc Robitaille | last post: by
1 post views Thread by Damir | last post: by
8 posts views Thread by BD | last post: by
2 posts views Thread by John | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.