Skip to contentSkip to conversation

Superflous code in mac_hid.c

PATCH New Matthias Grimm 1 participant 1 message Feb 4, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Superflous code in mac_hid.c

Hi Ben,

The following patch deletes some code lines in mac_hid.c which were from my point of view an copy-&-paste artefact from char/pc_keyb.c.

macintosh/mac_hid.c renamed from macintosh/mac_hid.c.orig +0 -0
@@ -363,11 +363,9 @@
 
			prev_scancode = 0;

			return 0;

		}
-
		} else {
+
		} else

		prev_scancode = 0;
-
			if (scancode == 0x2a || scancode == 0x36)
-
				return 0;
-
		}

+

	if (e0_keys[scancode])

		*keycode = e0_keys[scancode];

	else {

----------------
The code is only nessecary to fix a misbehaviour of a special pc keyboard as described in char/pc_keyb.c. I think it's not relevant for macintosh computers.

The reason to delete this lines is that two scancodes can't be used. I found this problem, as I tried to assign the Keycode 209 to the Fn-Key for test purposes. After all translations and mappings the key sequence 0xe0 0x36 was generated and quashed by this code lines.

This is a low priority and temporary patch (until the new input device is fully integrated in the kernel), but temporary solutions mostly have incredible livespans. ;-)

Kind regards
Matthias Grimm

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/