Returns a key number to be used to index keybindings[] by looking at the given string. Single ascii characters return themselves, while the K_ names are matched up.
(String str)
| 469 | * the K_* names are matched up. |
| 470 | */ |
| 471 | private static int StringToKeynum(String str) { |
| 472 | |
| 473 | if (str == null) |
| 474 | return -1; |
| 475 | |
| 476 | if (str.length() == 1) |
| 477 | return str.charAt(0); |
| 478 | |
| 479 | for (int i = 0; i < keynames.length; i++) { |
| 480 | if (str.equalsIgnoreCase(keynames[i])) |
| 481 | return i; |
| 482 | } |
| 483 | |
| 484 | return -1; |
| 485 | } |
| 486 | |
| 487 | private static void Message(int key) { |
| 488 |
no outgoing calls
no test coverage detected