Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

23
LINES

< > BotCompany Repo | #1013053 // rsyntaxTextArea_fixNumPad

JavaX fragment (include)

import org.fife.ui.rsyntaxtextarea.*;

static Map<Int> rsyntaxTextArea_fixNumPad_map = litmap(
  KeyEvent.VK_UP, KeyEvent.VK_KP_UP,
  KeyEvent.VK_DOWN, KeyEvent.VK_KP_DOWN,
  KeyEvent.VK_LEFT, KeyEvent.VK_KP_LEFT,
  KeyEvent.VK_RIGHT, KeyEvent.VK_KP_RIGHT
);

sbool rsyntaxTextArea_fixNumPad_done;

static void rsyntaxTextArea_fixNumPad() {
  if (rsyntaxTextArea_fixNumPad_done) ret;
  new RSyntaxTextAreaDefaultInputMap inputMap;
  for (KeyStroke key : inputMap.keys()) {
    Int code = rsyntaxTextArea_fixNumPad_map.get(key.getKeyCode());
    if (code != null)
      inputMap.put(KeyStroke.getKeyStroke(code, key.getModifiers()),
        inputMap.get(key));
  }
  UIManager.put("RSyntaxTextAreaUI.inputMap", inputMap);
  //set rsyntaxtextarea_done;
}

Author comment

Began life as a copy of #1013052

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1013053
Snippet name: rsyntaxTextArea_fixNumPad
Eternal ID of this version: #1013053/5
Text MD5: 2c77a653538383c6d6ac31afdce8d8f4
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-02 09:43:33
Source code size: 774 bytes / 23 lines
Pitched / IR pitched: No / No
Views / Downloads: 512 / 528
Version history: 4 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)