473,665 Members | 2,740 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Keys enum missing keys

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

thanks
Oct 6 '08 #1
2 3780

"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.Re adByte() 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
3393
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 the compiler error. Please help if possible. Thanks in advance. // Compiler error ra:/home/ssangapu/personal/C++/STL/mapIter-738>g++ main.cc utlMapIterator.h: In method `class Object *& ValueIterator<_Rb_tree_iterator<pair<const int,Object...
4
3046
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 { DOUBLE_LIST, INT_LIST } DATA_TYPE; typedef struct { DATA_TYPE type;
6
6168
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#: public enum Level = { low, medium, high }; public enum Foo = { bar, subbar, superbar }; Now my idea was to create a two-dimensional array using those enum's
2
5773
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 ideas? Thanks Joey
1
2411
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
23593
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 FOO_STORE to be, say -10, I get a warning about unsigned comparison and I'm seeing an infinite loop. If I do initialize FOO_STORE = -10, I don't see any warnings. No infinite loop.
7
9825
by: Harris | last post by:
Dear all, I have the following codes: ====== public enum Enum_Value { Value0 = 0, Value1 = 10,
34
11177
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 snippet that I wrote today that gives me an instant implementation of the pattern. I could easily just always use such an implementation instead of a standard enum, so I wanted to know what you experts all thought. Is there a case for standard enums?
4
1505
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
8348
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8779
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7376
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6187
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5660
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4356
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2765
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2004
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1761
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.