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

Re: Dead keys?

At 11:29 AM 93.11.09 -0500, Peter Szolovits wrote:
>and shareware keyboard layouts are available for this purpose.").  I have
>just tried copying the "US Live" KCHR from Mac Gambit into a clean MCL
>2.0.1, but it appears not to have any effect.  E.g., m-e is still eaten as

I am the culprit who made US Live for Gambit, and although I never
considered using it in MCL, I don't see any reason why it should not work.
It will not do anything until it's selected. In C this is done with:

/* in initialization... */

  OrigKeysID = GetScript( smRoman, smScriptKeys );
  OrigIconID = GetScript( smRoman, smScriptIcon );

/* in response to "small keyboard item" menu activity */

static void doKeyBdMode()
{ short temp;
  CheckItem( menus[editM], smKeyBdCommand, smKeyBdP );
  /* switches back and forth turning dead keys off and on */
  temp = SetScript( smRoman, smScriptKeys, smKeyBdP ? LiveKeysID : OrigKeysID );
  if( temp != noErr ) { io_err( temp ); return; }
  temp = SetScript( smRoman, smScriptIcon, smKeyBdP ? LiveKeysID : OrigIconID );
  if( temp != noErr ) { io_err( temp ); return; }
  KeyScript( smRoman );

Where LiveKeysID is the resource ID of the US Live KCHR and icon.

Summary: it's necessary to call SetScript for the new KCHR and icon, and
KeyScript to ensure that it takes effect with the appropriate script.

Let me know if you need help translating this to LISP.