views:

218

answers:

3

Hello all.

I've written some BlackBerry apps, but now i'm trying to write one that must access the hardware (keyboard) in some low level way, and I can't seem to find a way to do it, nor any help to it in the 'official' boards.

The thing is, I need to know when, at any time, the '$' key is pressed in the blackberry keyboard, so my app (or resident service) can catch it, stop the '$' char from displaying, and if the user presses a vowel next, then add an accent to that vowel... and if it presses another key, just send back the '$' char + the other char.

i.e. '$' + 'a' = á

In other words, I need to create an app or service that converts the '$' key into an accent key, just like typical non-US PC keyboards works.

Now here's the problem: The whole Blackberry OS works under a Java Virtual Machine (Kind of making the JVM the actual OS). So as you can imagine, every app written for it is written in Java.

There's obviously a set of special blackberry api libraries into their Java implementation so the developer is able to access particular Blackberry functions and features... however there doesn't seem to be a thing that I can use to achieve my particular task.

But then maybe there is, and I haven't found it, since I'm still new to Blackberry Programming.

So, in that note, any help or comment will be greatly appreciated.

-Gabriel Alonso.

A: 

Blackberry do not allow execute applications, if they use certain API, not to mention the low-level programming.

All that you can use in your applications for keypad handling - it is possibilities of Java. Like KeyListener interface and Keypad class.

Yeti
+1  A: 

A screen need to have the focus to be able to get key Event.

RIM dosen't allow low level access to their hardware for security reason.

Press and hold a letter key and roll the thumb-wheel to scroll through international/accent characters, equation symbols and other marks.

Here is the source

Michael B.
Thanks, Livinloud. My clients are aware of this, however this is a very cumbersome way of typing important characters for business emails and such. It's just not fast enough.That's why I've been given the task of coding such functionality.
gaboalonso
@gaboalonso If you want a better answer on this matter, I would recommend you contact RIM directly.
Michael B.
A: 

This is a very late reply, however...

You can use keyChar (member of screen, and of KeyListenerInterface) to intercept any key - for the first letter, capture the key pressed. If it's "$" hold onto it and don't call super.keyChar. On the next keyChar (or after a delay with no input) perform your mapping if $ was previously pressed, and send your designed character code to the super.keyChar call. keyDown and keyUp can be used similarly if keyChar presents implementation issues.

Marc Paradise