MacErudite Mac Forums Forum Index
  

NSEvent and DeadKeys question

 
Post new topic    MacErudite Mac Forums Forum Index -> General Programming
View previous topic :: View next topic  
Sponsored Links
Ingolf Schaefer
Guest





 PostPosted: Tue Jul 03, 2007 9:48 am    Post subject: NSEvent and DeadKeys question Back to top

Hi,

maybe there is someone here who can help me. (I hope this is not a faq, but I have problems with the ADC docs here...) I am trying to fix a bug in some open source port, which is unfortunately not taken care of anymore. It uses a simple

NSString *nss = [theEvent charactersIgnoringModifiers];
in the keyDown: method of its own NSView subclass to parse keyboard events. Now, it checks the string and reacts accordingly.
The problem is: On my German keyboard the "^" is a dead one, i.e. if I press it and then the space bar I get a "^". Otherwise just an accent. This results in an empty string for the "^" followed by " " for the space bar in my keyDown: method. Changing to

NSString *nss = [theEvent characters];

does not change this. How can I get a "^" string? Must I use interpretKeys: and implement an insertText: method? I would like to change a little as possible to fix this, so is there another way?
Thanks,

Ingolf
 
Display posts from previous:   
Post new topic    MacErudite Mac Forums Forum Index -> General Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum