Previously, if you were hold down shift for 1-2 seconds and then press
a key, you would get superfluous key repeats (even tho you released
the printable key). This was because the "key repeat" code was not
checking for the same key before (re)starting the repeat timer.
This fixes the repeating key issue by checking if the key pressed is
different than the one already pressed. If so, it will (re)start the
timer. If it is not different, then the timer is already running and
we don't need to do anything.
Fixes T552
Signed-off-by: Chris Michael <cp.michael@samsung.com>
if (input->repeat.tmr) ecore_timer_del(input->repeat.tmr);
input->repeat.tmr = NULL;
}
- else if (state)
+ else if ((state) && (keycode != input->repeat.key))
{
input->repeat.sym = sym;
input->repeat.key = keycode;
{
input->repeat.tmr =
ecore_timer_add(0.025, _ecore_wl_input_cb_keyboard_repeat, input);
- ecore_timer_delay(input->repeat.tmr, 0.4);
}
+ ecore_timer_delay(input->repeat.tmr, 0.4);
}
}