Libraryless. Click here for Pure Java version (7916L/44K).
static KeyListener ctrlLetterKeyListener(char letter, Runnable action) { ret new KeyAdapter { public void keyReleased(KeyEvent ke) { if (ke.getKeyCode() == charToKeyCode(letter) && ke.getModifiers() == KeyEvent.CTRL_MASK) { pcallF(action); } } }; }
Began life as a copy of #1035314
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1035400 |
Snippet name: | ctrlLetterKeyListener - e.g. Ctrl+B |
Eternal ID of this version: | #1035400/1 |
Text MD5: | 0d9c0332bbe3b7b1d6f728c3170dfb1c |
Transpilation MD5: | 77dda065802b99cc2b95366ccc4bb471 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-05-06 14:53:20 |
Source code size: | 288 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 126 / 181 |
Referenced in: | [show references] |