[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Keyclick fixes



Vincent Rivière wrote:
Here is an intermediate patch. Since the standard keyclick routine ignores
the scancode passed as parameter, no one noticed that it was wrong.

When the above one is applied, please apply this new one to streamline the key clicks. They now happen in any expected situation, including Shift+F6 and releasing the Alt key after typing an ASCII code. The mouse emulation Alt+Arrows still does not generate key clicks, as I saw that the mouse movement repetition is unrelated to the keyboard repeat (unlike old TOS).

So after this patch, the FreeMiNT kernel is clean regarding to the Eiffel mouse wheel keyclicks.

Helmut, please commit!

Streamline key clicks. Contributed by Vincent Riviere.

--
Vincent Rivière
--- freemint.orig/sys/keyboard.c	2011-05-21 12:49:05.984375000 +0200
+++ freemint/sys/keyboard.c	2011-05-21 14:42:27.890625000 +0200
@@ -412,6 +412,7 @@
 kbd_repeat(PROC *p, long arg)
 {
 	put_key_into_buf(last_iorec, last_key[0], last_key[1], last_key[2], last_key[3]);
+	kbdclick(last_key[1]);
 	k_to = addroottimeout(keyrep_time, kbd_repeat, 1);
 }
 
@@ -607,9 +608,6 @@
 		last_key[1] = c1;
 		last_key[2] = c2;
 		last_key[3] = c3;
-
-		if (!is_eiffel_mouse_key(c1))
-			kbdclick(c1);
 	}
 
 	kintr = 1;
@@ -1043,6 +1041,7 @@
 						numin[0] = 0;
 
 						put_key_into_buf(iorec, 0, 0, 0, (uchar)ascii_c);
+						kbdclick(0);
 					}
 				}
 				break;
@@ -1325,6 +1324,8 @@
 			}
 			else
 				put_key_into_buf(iorec, shift, (uchar)scan, 0, ascii);
+
+			kbdclick(scan);
 		}
 #ifndef MILAN
 		set_keyrepeat_timeout(make);