Libraryless. Click here for Pure Java version (7916L/44K).
1 | static KeyListener ctrlLetterKeyListener(char letter, Runnable action) { |
2 | ret new KeyAdapter { |
3 | public void keyReleased(KeyEvent ke) { |
4 | if (ke.getKeyCode() == charToKeyCode(letter) && ke.getModifiers() == KeyEvent.CTRL_MASK) { |
5 | pcallF(action); |
6 | } |
7 | } |
8 | }; |
9 | } |
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: | 127 / 182 |
Referenced in: | [show references] |