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

5
LINES

< > BotCompany Repo | #1031266 // disableSpaceBarForAllButtons

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2932L/17K).

svoid disableSpaceBarForAllButtons() swing {
  InputMap im = (InputMap) UIManager.get("Button.focusInputMap");
  im.put(KeyStroke.getKeyStroke("pressed SPACE"), "none");
  im.put(KeyStroke.getKeyStroke("released SPACE"), "none");
}

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031266
Snippet name: disableSpaceBarForAllButtons
Eternal ID of this version: #1031266/1
Text MD5: a807e7fe8baf15236da6709d7ec90a37
Transpilation MD5: 219fcab0a3c01a067af88869222c9b76
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-05-27 15:06:59
Source code size: 235 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 185 / 256
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)