Replace the keys on the keyboard

M

Melson

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
 
B

Barry Kelly

Melson said:
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
 
C

chanmm

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
 
G

Guest

Melson said:
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
 
M

Melson

Hi Everyone

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

Regards
Melson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top