MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / keyRepeated

Method keyRepeated

CodenameOne/src/com/codename1/ui/Form.java:3273–3291  ·  view source on GitHub ↗
(int keyCode)

Source from the content-addressed store, hash-verified

3271
3272 /// {@inheritDoc}
3273 @Override
3274 public void keyRepeated(int keyCode) {
3275 if (focused != null) {
3276 if (focused.isEnabled()) {
3277 focused.keyRepeated(keyCode);
3278 }
3279 int game = Display.getInstance().getGameAction(keyCode);
3280 // this has issues in the WTK
3281 // Fix for issue 433: the focus might be changed by the key repeated method in a way that can turn it to null
3282 if (!focused.handlesInput()
3283 && (game == Display.GAME_DOWN || game == Display.GAME_UP || game == Display.GAME_LEFT || game == Display.GAME_RIGHT)) {
3284 keyPressed(keyCode);
3285 keyReleased(keyCode);
3286 }
3287 } else {
3288 keyPressed(keyCode);
3289 keyReleased(keyCode);
3290 }
3291 }
3292
3293 private void initRippleEffect(int x, int y, Component cmp) {
3294 if (cmp.isRippleEffect()) {

Callers 2

edtLoopImplMethod · 0.95
testKeyboardInputMethod · 0.45

Calls 6

getInstanceMethod · 0.95
keyPressedMethod · 0.95
keyReleasedMethod · 0.95
isEnabledMethod · 0.65
getGameActionMethod · 0.45
handlesInputMethod · 0.45

Tested by 1

testKeyboardInputMethod · 0.36