/* * keyString * Converts keypresses to strings * * © 1992-1998 Straylight */ /*----- Licensing note ----------------------------------------------------* * * This file is part of Straylight's Steel library. * * Steel is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * Steel is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Steel. If not, write to the Free Software Foundation, * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __keyString_h #define __keyString_h /* * char *keyString(int key) * * Use * Converts a keypress as returned by the WIMP into a string suitable for * displaying to the user, for example as a keyboard shortcut. The routine * handles the following cases: * * * Function keys and Print, possibly with and/or * * Alphabetic keys with * * Note: f12 is not trapped; neither is M, since this is . * * Parameters * int key == the key pressed * * Returns * A pointer to a READ-ONLY string, or 0 if the key was invalid. */ char *keyString(int key); /* * char *keyString_convert(int key,BOOL mnu) * * Use * Converts a STEEL extended keypress into a string suitable for displaying * either as a short-cut string in a dialogue box or in a menu * * Parameters * int key == the keypress to translate * BOOL mnu == TRUE to create menu shortcut string, FALSE for dbox * * Returns * A pointer to the string, or 0 */ char *keyString_convert(int key,BOOL mnu); #endif