shithub: rd

Download patch

ref: 25e9575509db6d607c5ca215b28393e64407d74c
parent: b71205289556e1c0baa4e68d46846c52ab675a1a
author: Yaroslav Kolomiiets <[email protected]>
date: Tue Mar 29 06:32:50 EDT 2016

kdb.c: send numeric keys as scan codes to enable iCloud two-factor auth code entry

--- a/kbd.c
+++ b/kbd.c
@@ -17,6 +17,8 @@
 {
 	Sext=	(1<<16),
 	Sesc=	1,
+	S1=	2,
+	S0=	11,
 	Sbspace=	14,
 	Stab=	15,
 	Sq=	16,
@@ -222,6 +224,20 @@
 			break;
 		case KF|12:
 			kbdsendscan(c, SF12, 0);
+			break;
+		case '0':
+			kbdsendscan(c, S0, 0);
+			break;
+		case '1':
+		case '2':
+		case '3':
+		case '4':
+		case '5':
+		case '6':
+		case '7':
+		case '8':
+		case '9':
+			kbdsendscan(c, S1+r-'1', 0);
 			break;
 		default:
 			kbdsendrune(c, r);