java - Convert string into keycode in android -


assume, have string s = "hello world". how can equivalent keycode each character? know way convert using,

char pressedkey = (char) event.getunicodechar();

while triggering event. in case dont have keyevent.

assume, in case, didn't use androidsdk , tried in java. need find out equivalent value of each character.

i have option doing above scenario storing keycode , character values in map compare string reading character.

can advise whether option good? if not, can 1 give best suggestion regard scenario?

you can use keystroke, have @ example:

keystroke kstroke = keystroke.getkeystroke('a'); system.out.println(ks.getkeycode()); 

also have here: keystroke

you can use above example key codes string. let me know if looking for.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -