static <A extends JComponent> A onCharDown(final VF1<Char> onCharDown, final A a) { if (a != null) swing { a.addKeyListener(new KeyAdapter { @Override public void keyTyped(KeyEvent e) { if (e.getModifiers() == 0) pcallF(onCharDown, e.getKeyChar()); } }); } ret a; } static <A extends JComponent> A onCharDown(A a, VF1<Char> onCharDown) { ret onCharDown(onCharDown, a); }
Began life as a copy of #1019018
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1020450 |
Snippet name: | onCharDown |
Eternal ID of this version: | #1020450/3 |
Text MD5: | 849feeb26e2e9a94aeef48b82651813f |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-12-22 18:39:54 |
Source code size: | 438 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 298 / 346 |
Version history: | 2 change(s) |
Referenced in: | [show references] |