Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 2nd, 2012  |  syntax: Java  |  size: 0.86 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.                         new TextEntry(new Coord(10, 50), new Coord(100, 20), tab, "") {
  2.                                 @Override
  3.                                 public boolean type(char c, KeyEvent e){
  4.                                         return true;
  5.                                 }
  6.                                
  7.                                 @Override
  8.                                 public boolean keydown(KeyEvent event) {
  9. //                                      if(event.isControlDown())
  10. //                                              c += 96;
  11. //                                      else if(event.isShiftDown()) {
  12. //                                              //блять таблицу символов проектировал ебаный мудак
  13. //                                              if(c > 32 && c < 38)
  14. //                                                      c +=
  15. //                                      }
  16.                                         String hotkey = String.valueOf(event.getKeyCode()).toUpperCase();
  17. //                                      if(KeyEvent.getKeyText((int)c).contains("Numpad"))
  18. //                                              hotkey = "Numpad-"+hotkey;
  19.                                         String mods = "";
  20.                                         if(event.isControlDown())
  21.                                                 mods += "Ctrl+";
  22.                                         if(event.isAltDown())
  23.                                                 mods += "Alt+";
  24.                                         if(event.isShiftDown())
  25.                                                 mods += "Shift+";
  26.                                         settext(mods+hotkey);
  27.                                         return true;
  28.                                 }
  29.                         };