Libraryless. Click here for Pure Java version (7881L/44K).
1 | static KeyListener functionKeyListener(int functionKeyNr, Runnable action) {
|
2 | ret new KeyAdapter {
|
3 | public void keyReleased(KeyEvent ke) {
|
4 | if (ke.getKeyCode() == KeyEvent.VK_F1+functionKeyNr-1 && ke.getModifiers() == 0) {
|
5 | pcallF(action); |
6 | } |
7 | } |
8 | }; |
9 | } |
Began life as a copy of #1017557
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1035314 |
| Snippet name: | functionKeyListener - e.g. F5 |
| Eternal ID of this version: | #1035314/3 |
| Text MD5: | 0bec6c4057a655d61a6bf456be9e8dbe |
| Transpilation MD5: | d62f148c38d39672caf11c192c9b333e |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-04-30 20:34:03 |
| Source code size: | 284 bytes / 9 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 390 / 498 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |