Re: [PATCH v4 7/7] Input: Add "inhibited" property

From
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date
2020-10-05 18:10:21
Also in
linux-acpi, linux-arm-kernel, linux-iio, linux-pm, linux-samsung-soc, linux-tegra, lkml, platform-driver-x86
Reply to
Andrzej Pietrasiewicz, 2020-06-08
Hi Andrzej,

On Mon, Jun 08, 2020 at 01:22:11PM +0200, Andrzej Pietrasiewicz wrote:
quoted hunk ↗ jump to hunk
@@ -284,8 +284,11 @@ static int input_get_disposition(struct input_dev *dev,
 	case EV_KEY:
 		if (is_event_supported(code, dev->keybit, KEY_MAX)) {
 
-			/* auto-repeat bypasses state updates */
-			if (value == 2) {
+			/*
+			 * auto-repeat bypasses state updates but repeat
+			 * events are ignored if the key is not pressed
+			 */
+			if (value == 2 && test_bit(code, dev->key)) {
 				disposition = INPUT_PASS_TO_HANDLERS;
 				break;
 			}
Is this chunk really part of inhibit support? I'd think we cancel
autorepeat timer when we are releasing a key, no?

Thanks.

-- 
Dmitry
Thread (101 messages) 101 messages, 11 authors, last reply 2020-12-11
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help