Click here to Skip to main content
11,573,935 members (69,291 online)
Click here to Skip to main content
Add your own
alternative version

Using Raw Input from C# to handle multiple keyboards

, , 9 Mar 2015 CPOL 533.4K 28.2K 192
Windows XP supports multiple keyboards, but by default, the .Net Framework will treat them all as one. This article explains how to use the Windows API Raw Input methods to support multiple keyboards from a C# application.
rawinput_2-noexe.zip
rawinput_2.zip
rawinput_2
Keyboard
Properties
Settings.settings
RawInput
RawInput.csproj.user
Properties
rawinput_latest.zip
rawinput latest
Keyboard
Properties
Settings.settings
RawInput
docs
Values for keyboard make-break (scan) code.pdf
Properties
RawInput.csproj.user
RawStuff.sln.docstates.suo
RawStuff.sln.DotSettings
RawStuff.sln.DotSettings.user
RawStuff.suo
RawStuff.v12.suo
rawinput_src-noexe.zip
rawinput_src.zip
RawInput
rawinput_wpf-noexe.zip
rawinput_wpf.zip
Winfx RawInput
WindowsApplication1
WPFRawInput.suo
WindowsApplication1
bin
Debug
WPFRawInput.exe
Properties
Settings.settings
#region Using directives

using System.Reflection;
using System.Windows;
using System.Runtime.InteropServices;

#endregion

// General Information about an assembly is controlled through the following 
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("WPFRawInput")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Messer")]
[assembly: AssemblyProduct("WPFRawInput")]
[assembly: AssemblyCopyright("Copyright @ Steve Messer 2006")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]

//In order to begin building localizable applications, set 
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>.  For example, if you are using US english
//in your source files, set the <UICulture> to en-US.  Then uncomment
//the NeutralResourceLanguage attribute below.  Update the "en-US" in
//the line below to match the UICulture setting in the project file.

//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]


[assembly: ThemeInfo(
    ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
    //(used if a resource is not found in the page, 
    // or application resource dictionaries)
    ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
    //(used if a resource is not found in the page, 
    // app, or any theme specific resource dictionaries)
)]


// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
//
// You can specify all the values or you can default the Revision and Build Numbers 
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Authors

Steve Messer
Software Developer (Senior)
United States United States
No Biography provided

Emma Burrows
Software Developer
United Kingdom United Kingdom
Emma's first steps in programming took place at primary school over thirty years ago, thanks to a TI-99/4A and the LOGO language. Following a Master's degree in English Studies (obtained, strangely enough, with a paper on the birth of the microcomputer), Emma started her career in IT.

Over the last ten years, she has worked as a localiser, technical writer, editor, web designer, systems administrator, team leader and support engineer, before finally making the move into software development a few years ago. She is now thrilled on a daily basis that she is getting paid for writing code after doing it for free half her life!

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150624.2 | Last Updated 9 Mar 2015
Article Copyright 2007 by Steve Messer, Emma Burrows
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid