changeset 27225:57bb8f531707

ginput.m: Make "Enter" key on numeric keypad stop input (bug #56599). * ginput.m (ginput_keypressfcn): Look for the key value "return" (main keyboard) or "enter" on numeric keypad to stop further input.
author Rik <rik@octave.org>
date Tue, 09 Jul 2019 17:50:56 -0700
parents 9b8903d3e626
children 6eb32f0aea87
files scripts/plot/util/ginput.m
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/ginput.m	Tue Jul 09 19:41:27 2019 +0200
+++ b/scripts/plot/util/ginput.m	Tue Jul 09 17:50:56 2019 -0700
@@ -146,8 +146,8 @@
 function ginput_keypressfcn (~, evt)
 
   point = get (gca (), "currentpoint");
-  if (strcmp (evt.Key, "return"))
-    ## Enter key stops ginput.
+  if (strcmp (evt.Key, "return") || strcmp (evt.Key, "enter"))
+    ## <Return> or <Enter> on numeric keypad stops ginput.
     ginput_accumulator (2, NaN, NaN, NaN);
   else
     character = evt.Character;