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

Re: Keyboard hack for powerbooks no longer works



Hmm, it still works for me.

I've attached the patch I use. 

  -- Matthew

on Thu, Nov 07, 2002 at 09:43:21PM -0700, Jason E. Stewart wrote:
> Hey All,
> 
> The lovely keyboard hack that enables you to remap the caps-lock key
> to be control on powerbooks stopped working in BenH kernels sometime
> after 2.4.16-pre1. I've got a whole series of 2.4.19 kernels and even
> though I added the adbhid.c patch it no longer works.
> 
> Any ideas what might have happened?
> 
> Thanks,
> jas.
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-powerpc-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
linux/drivers/macintosh/adbhid.c 
145a146,172
> #if 1
> 	static int caps_lock_down = 0;
> #endif
> 
> #if 1
> 	if (1) {
> 		/* HACK to fix caps-lock on Powerbook(?) keyboards */
> 		switch (keycode) {
> 		case 0x39:
> 			caps_lock_down = 1;
> 			break;
> 		case 0xff:
> 			if (caps_lock_down) {
> 				/* 'caps-lock' is down, must be
> 				 * 'caps-lock' being released
> 				 */
> 				caps_lock_down = 0;
> 				keycode = 0xb9;
> 			} else {
> 				/* must be 'caps-lock' being pressed
> 				 */
> 				keycode = 0x39;
> 			}
> 			break;
> 		}
> 	}
> #endif
152,154c179,185
< 		input_report_key(&adbhid[id]->input, KEY_CAPSLOCK, 1);
< 		input_report_key(&adbhid[id]->input, KEY_CAPSLOCK, 0);
< 		return;
---
> 	  if (0) {
> 	    input_report_key(&adbhid[id]->input, KEY_CAPSLOCK, 1);
> 	    input_report_key(&adbhid[id]->input, KEY_CAPSLOCK, 0);
> 	    return;
> 	  } else {
> 	    break;
> 	  }

Reply to: