Skip to contentSkip to conversation

Input: atkbd - correct MSC_SCAN events for force_release keys

PATCH Applied Stefan Brüns 2 participants 2 messages Nov 16, 2014 – Nov 17, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: atkbd - correct MSC_SCAN events for force_release keys

Without the change either no scancode would be reported on release of force_release keys, or - if the key is marked as force_release erroneously - the release event and the scancode would be reported in separate reports to the input layer.

---

Originally sent on 28.9.2014, but somehow got lost. Resending as per Dmitrys request from 24.10.2014

 drivers/input/keyboard/atkbd.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/input/keyboard/atkbd.c +0 -0
index 2dd1d0d..6375ae6 100644
@@ -456,8 +456,9 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, 

unsigned char data,

keycode = atkbd->keycode[code];

- if (keycode != ATKBD_KEY_NULL)
- input_event(dev, EV_MSC, MSC_SCAN, code);
+ if (!(atkbd->release && test_bit(code, atkbd->force_release_mask)))
+ if (keycode != ATKBD_KEY_NULL)
+ input_event(dev, EV_MSC, MSC_SCAN, code);

switch (keycode) {
case ATKBD_KEY_NULL:
@@ -511,6 +512,7 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
input_sync(dev);

if (value && test_bit(code, atkbd->force_release_mask)) {
+ input_event(dev, EV_MSC, MSC_SCAN, code);
input_report_key(dev, keycode, 0); input_sync(dev);
}

Signature · 11 lines
1.8.4.5


-- 
Stefan Brüns  /  Bergstraße 21  /  52062 Aachen
home: +49 241 53809034     mobile: +49 151 50412019
work: +49 2405 49936-424
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer Applied
#1 lore raw
Quoted 10 lines · Stefan Brüns

Without the change either no scancode would be reported on release of force_release keys, or - if the key is marked as force_release erroneously - the release event and the scancode would be reported in separate reports to the input layer.

---

Originally sent on 28.9.2014, but somehow got lost. Resending as per Dmitrys request from 24.10.2014

Applied, thank you, but please next time don't use Kmail for patches - it line-wrapped the patch and encoded it as quoted-printable.

Thanks!

Quoted 38 lines
 drivers/input/keyboard/atkbd.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/input/keyboard/atkbd.c +3 -2
index 2dd1d0d..6375ae6 100644
@@ -456,8 +456,9 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, 
 unsigned char data,
 
 	keycode = atkbd->keycode[code];
 
-	if (keycode != ATKBD_KEY_NULL)
-		input_event(dev, EV_MSC, MSC_SCAN, code);
+	if (!(atkbd->release && test_bit(code, atkbd->force_release_mask)))
+		if (keycode != ATKBD_KEY_NULL)
+			input_event(dev, EV_MSC, MSC_SCAN, code);
 
 	switch (keycode) {
drivers/input/keyboard/atkbd.c +1 -0
 	case ATKBD_KEY_NULL:
@@ -511,6 +512,7 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, 
 unsigned char data,
 		input_sync(dev);
 
 		if (value && test_bit(code, atkbd->force_release_mask)) {
+			input_event(dev, EV_MSC, MSC_SCAN, code);
 			input_report_key(dev, keycode, 0);
 			input_sync(dev);

}

Signature · 7 lines
1.8.4.5


-- 
Stefan Brüns  /  Bergstraße 21  /  52062 Aachen
home: +49 241 53809034     mobile: +49 151 50412019
work: +49 2405 49936-424
Signature · 5 lines
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html