Key events in upper case.

Put your problem here if it does not fit any of the other categories.

Key events in upper case.

Postby x-files » Mon Jan 14, 2008 1:04 am

Hello.

How I can handle next keys on keyboard: * / + -.

What are means FN meta key and SYM meta key?

Thanks
x-files
Developer
Developer
 
Posts: 44
Joined: Fri Jan 11, 2008 10:27 am

Top

Postby plusminus » Mon Jan 14, 2008 11:55 pm

Hello x-files,

These are the codes to use (why the hell is there no KeyEvent.KEYCODE_PLUS :?: )
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. * --> KeyEvent.KEYCODE_STAR
  2. / --> KeyEvent.KEYCODE_SLASH
  3. + --> KeyEvent.KEYCODE_GRAVE // ??????
  4. - --> KeyEvent.KEYCODE_MINUS
Parsed in 0.029 seconds, using GeSHi 1.0.8.4


In OnKeyDown of Activity, the following code works, to recognize, when the user typed a plus (+) on his keyboard (not the emulator one!):
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.                 if(event.isCapPressed() && keyCode == KeyEvent.KEYCODE_EQUALS)
  2.                         Log.d("DEBUGTAG","DEBUGTAG >>> PLUS-Key <<<");
Parsed in 0.032 seconds, using GeSHi 1.0.8.4


Thes other KeyState (FN and SYM) are a bit mysterious, especially with not API-Documentation :(

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby x-files » Tue Jan 15, 2008 11:44 am

Thanks a lot!
x-files
Developer
Developer
 
Posts: 44
Joined: Fri Jan 11, 2008 10:27 am

plus?

Postby zanky » Thu Jul 17, 2008 10:14 pm

I don't mean to resuscitate an old thread, but I found something interesting:

According to the API, there IS a KEYCODE_PLUS.

source: http://code.google.com/android/referenc ... Event.html

My guess is that it was added in the latest SDK update in March. But... KEYCODE_GRAVE is still there. So is it really a plus sign? or something else? I wonder if it has something to do with accents...

On an unrelated subject, I was searching for F# keys (like, I want to use F6), but Android (the OS/API, not the emulator) does not appear to Support F keys.... or am I missing something?

--Z
zanky
Junior Developer
Junior Developer
 
Posts: 11
Joined: Thu Jul 10, 2008 4:45 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 15 guests