From 054a901b992e52e101a42996fcf22e16b1b39bcd Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Wed, 3 Jun 2015 09:32:09 +0200 Subject: [PATCH] New editor: keypad arrows were ignored. Added bindings to make them work like normal arrows. No modifiers attached, so no shift/ctrl/etc combination: it screws up text Fixes #2317 --- .../app/syntax/SketchTextAreaDefaultInputMap.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/processing/app/syntax/SketchTextAreaDefaultInputMap.java b/app/src/processing/app/syntax/SketchTextAreaDefaultInputMap.java index d558c98f4..01169dd6c 100644 --- a/app/src/processing/app/syntax/SketchTextAreaDefaultInputMap.java +++ b/app/src/processing/app/syntax/SketchTextAreaDefaultInputMap.java @@ -52,5 +52,11 @@ public class SketchTextAreaDefaultInputMap extends RSyntaxTextAreaDefaultInputMa } put(KeyStroke.getKeyStroke(KeyEvent.VK_DIVIDE, defaultModifier), RSyntaxTextAreaEditorKit.rstaToggleCommentAction); + + put(KeyStroke.getKeyStroke(KeyEvent.VK_KP_LEFT, 0), DefaultEditorKit.backwardAction); + put(KeyStroke.getKeyStroke(KeyEvent.VK_KP_RIGHT, 0), DefaultEditorKit.forwardAction); + put(KeyStroke.getKeyStroke(KeyEvent.VK_KP_DOWN, 0), DefaultEditorKit.downAction); + put(KeyStroke.getKeyStroke(KeyEvent.VK_KP_UP, 0), DefaultEditorKit.upAction); + } }