c IPAMenu.kmn c c Copyright ©2002 Tavultesoft. c c Demonstrates simple use of multiple groups to create a menu-based c system for entering IPA characters, based on an example created c by Peter E. Hauer's. c c A font with the IPA unicode characters defined must be used with this c keyboard, for example, Code2000 or Lucida Sans Unicode c c Note that the stores pertaining to each letter could be placed in the c group for that letter; the location of stores in the keyboard source c has no effect on the final keyboard. Version 6.0 Name "IPA Menu Example" c This keyboard should be independent of the user's c system keyboard layout store(&MnemonicLayout) '1' c ******************************************************************* begin Unicode > use( first ) c keys used to choose menu items store( choices ) '1234567890' c menu stores store( a_menu ) '[1æ 2a 3ɑ 4ɐ 5ʌ 6ɒ]' store( e_menu ) '[1ɛ 2ɜ 3ə 4e 5ɘ 6ɚ 7ɝ 8ɞ]' store( o_menu ) '[1o 2ø 3ɔ]' c add more menu stores here c character choice stores - error deadkeys are used to pad c out the stores so they are the same length as the choices store store( a_chars ) 'æaɑɐʌɒ' dk(a_err) dk(a_err) dk(a_err) dk(a_err) store( e_chars ) 'ɛɜəeɘɚɝɞ' dk(e_err) dk(e_err) store( o_chars ) 'oøɔ' dk(o_err) dk(o_err) dk(o_err) dk(o_err) dk(o_err) dk(o_err) dk(o_err) c add more char stores here c ******************************************************************* c first matches a menu in the context or passes processing to main group( first ) c match a menu on the context outs(a_menu) > use(a_group) outs(e_menu) > use(e_group) outs(o_menu) > use(o_group) c add more menus here c no menu was in the context, so process keys normally nomatch > use(main) c ******************************************************************* c main outputs the menus, and handles any other normal key processing group( main ) using keys c output a menu if appropriate + 'a' > outs(a_menu) + 'e' > outs(e_menu) + 'o' > outs(o_menu) c add more menu keys here c ******************************************************************* c final matches error markers and finishes processing group( final ) dk(a_err) > beep outs(a_menu) dk(e_err) > beep outs(e_menu) dk(o_err) > beep outs(o_menu) c add more error-marker handlers here c ******************************************************************* c a_group handles the menu for a group( a_group ) using keys + any(choices) > index(a_chars, 1) use( final ) c output chosen character c + [K_BKSP] > nul c delete menu nomatch > dk(a_err) use( final ) c invalid choice - error c ******************************************************************* c e_group handles the menu for e group( e_group ) using keys + any(choices) > index(e_chars, 1) use( final ) c output chosen character c + [K_BKSP] > nul c delete menu nomatch > dk(e_err) use( final ) c invalid choice - error c ******************************************************************* c o_group handles the menu for o group( o_group ) using keys + any(choices) > index(o_chars, 1) use( final ) c output chosen character c + [K_BKSP] > nul c delete menu nomatch > dk(o_err) use( final ) c invalid choice - error c add more menu groups here c End of file