473,387 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Keys enum missing keys

where are the following key codes in System.Windows.Forms.Keys
: ; * = . , ' "

thanks
Oct 6 '08 #1
2 3763

"John" wrote:
where are the following key codes in System.Windows.Forms.Keys
: ; * = . , ' "

thanks
Hi John,

There are oem keys and will vary from keyboard to keyboard. To find out
what those keys are on your keyboard trap the KeyDown event and output the
received keys as you type the keyboard.

For comparison on my keyboard (Norwegian) those map to
OemPeriod, Oemcomma, OemQuestion, D0, OemPeriod, Oemcomma, OemQuestion, D2

if I switch to English keyboard they will map to
Oem1, Oem1, D8, OemPlus, OemComma, OemPeriod, Oem7, Oem7

You may use the Keys enumeration to map keyboard key behaviour, but you
shouldn't map the keys to specific characters as that will depend on the
keyboard layout.

--
Happy Coding!
Morten Wennevik [C# MVP]
Oct 6 '08 #2
Morten Wennevik [C# MVP] wrote:
There are oem keys and will vary from keyboard to keyboard.
Hi Morten,

Right, thanks. I was in state of confusion converting some code from C++
that needs to parse characters out of a string. The seeming ubiquitous
C# stream interface that always returns Int32 (even the
MemoryStream.ReadByte() converts to Int32) confused me to the point
where I momentarily thought that KeyCode enumerated character values,
not, uh, KeyCodes :)

Anyways, I have decided to use the BinaryStream since it seems to be the
only one that allows you to specify an Encoding. Problem is the C++ code
relies on the putback() function, the MemoryStream supports this but the
convolution of it converting to Int32 makes it better to re-implement
using Peek() with the BinaryStream. Also, I like the BinaryStream
because I can easily refactor to another Encoding.

Thanks again.
Oct 7 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: sks_cpp | last post by:
I am trying to wrap the map iterator for keys and values. However, I seem to run into problems with the values for const_iterator - it works for all other combinations. Below I list my code and...
4
by: Chris | last post by:
I've lurked around long enough... Time to interract =) I'm trying to make sense of the following. I can't quite wrap my head around what this is actually doing: ------------- typedef enum {...
6
by: Marc Scheuner [MVP ADSI] | last post by:
Folks, I was trying to achieve the following thing: I have a "structure" that basically is a two-dimensional array of numeric values. Both dimensions are handled by enumeration types in C#: ...
2
by: Joey Lee | last post by:
Hi, Microsoft provided some naming conventions for namespace, classes, properties and etc. However I am looking for naming convention for keys in resource files for multiple languages. Any...
1
by: news.microsoft.com | last post by:
Hi, How to load the list of keys enumeration name and value in a combo box. Thanks saran
10
by: kar1107 | last post by:
Hi all, Can the compiler chose the type of an enum to be signed or unsigned int? I thought it must be int; looks like it changes based on the assigned values. Below if I don't initialize...
7
by: Harris | last post by:
Dear all, I have the following codes: ====== public enum Enum_Value { Value0 = 0, Value1 = 10,
34
by: Steven Nagy | last post by:
So I was needing some extra power from my enums and implemented the typesafe enum pattern. And it got me to thinking... why should I EVER use standard enums? There's now a nice little code...
4
by: =?Utf-8?B?cmF5ZnVzaW9u?= | last post by:
I am storing Keys.Right in a string and I need to convert it to back to the Keys Enumeration so I can handle it correctly. How do I do this?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.