Get the latest Blender, older versions, or experimental builds.
Stay up-to-date with the new features in the latest Blender releases.
Access production assets and knowledge from the open movies.
Documentation on the usage and features in Blender.
Latest development updates, by Blender developers.
Guidelines, release notes and development docs.
A platform to collect and share results of the Blender Benchmark.
The yearly event that brings the community together.
Support core development with a monthly contribution.
Perform a single donation with more payment options available.
/**
* $Id$
*
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
* This program 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
* of the License, or (at your option) any later version. The Blender
* Foundation also sells licenses for use in proprietary software under
* the Blender License. See http://www.blender.org/BL/ for information
* about this.
* This program 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 this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
* All rights reserved.
* The Original Code is: all of this file.
* Contributor(s): none yet.
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
#include "BLI_blenlib.h"
#include "BLI_arithb.h"
#include "BLI_editVert.h"
#include "BIF_keyval.h"
#include "blendef.h"
#include "mydevice.h"
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
char *key_event_to_string(unsigned short event)
{
switch(event) {
case AKEY:
return "A";
break;
case BKEY:
return "B";
case CKEY:
return "C";
case DKEY:
return "D";
case EKEY:
return "E";
case FKEY:
return "F";
case GKEY:
return "G";
case HKEY:
return "H";
case IKEY:
return "I";
case JKEY:
return "J";
case KKEY:
return "K";
case LKEY:
return "L";
case MKEY:
return "M";
case NKEY:
return "N";
case OKEY:
return "O";
case PKEY:
return "P";
case QKEY:
return "Q";
case RKEY:
return "R";
case SKEY:
return "S";
case TKEY:
return "T";
case UKEY:
return "U";
case VKEY:
return "V";
case WKEY:
return "W";
case XKEY:
return "X";
case YKEY:
return "Y";
case ZKEY:
return "Z";
case ZEROKEY:
return "Zero";
case ONEKEY:
return "One";
case TWOKEY:
return "Two";
case THREEKEY:
return "Three";
case FOURKEY:
return "Four";
case FIVEKEY:
return "Five";
case SIXKEY:
return "Six";
case SEVENKEY:
return "Seven";
case EIGHTKEY:
return "Eight";
case NINEKEY:
return "Nine";
case LEFTCTRLKEY:
return "Leftctrl";
case LEFTALTKEY:
return "Leftalt";
case RIGHTALTKEY:
return "Rightalt";
case RIGHTCTRLKEY:
return "Rightctrl";
case RIGHTSHIFTKEY:
return "Rightshift";
case LEFTSHIFTKEY:
return "Leftshift";
case ESCKEY:
return "Esc";
case TABKEY:
return "Tab";
case RETKEY:
return "Ret";
case SPACEKEY:
return "Space";
case LINEFEEDKEY:
return "Linefeed";
case BACKSPACEKEY:
return "Backspace";
case DELKEY:
return "Del";
case SEMICOLONKEY:
return "Semicolon";
case PERIODKEY:
return "Period";
case COMMAKEY:
return "Comma";
case QUOTEKEY:
return "Quote";
case ACCENTGRAVEKEY:
return "Accentgrave";
case MINUSKEY:
return "Minus";
case SLASHKEY:
return "Slash";
case BACKSLASHKEY:
return "Backslash";
case EQUALKEY:
return "Equal";
case LEFTBRACKETKEY:
return "Leftbracket";
case RIGHTBRACKETKEY:
return "Rightbracket";
case LEFTARROWKEY:
return "Leftarrow";
case DOWNARROWKEY:
return "Downarrow";
case RIGHTARROWKEY:
return "Rightarrow";
case UPARROWKEY:
return "Uparrow";
case PAD2:
return "Pad2";
case PAD4:
return "Pad4";
case PAD6:
return "Pad6";
case PAD8:
return "Pad8";
case PAD1:
return "Pad1";
case PAD3:
return "Pad3";
case PAD5:
return "Pad5";
case PAD7:
return "Pad7";
case PAD9:
return "Pad9";
case PADPERIOD:
return "Padperiod";
case PADSLASHKEY:
return "Padslash";
case PADASTERKEY:
return "Padaster";
case PAD0:
return "Pad0";
case PADMINUS:
return "Padminus";
case PADENTER:
return "Padenter";
case PADPLUSKEY:
return "Padplus";
case F1KEY:
return "F1";
case F2KEY:
return "F2";
case F3KEY:
return "F3";
case F4KEY:
return "F4";
case F5KEY:
return "F5";
case F6KEY:
return "F6";
case F7KEY:
return "F7";
case F8KEY:
return "F8";
case F9KEY:
return "F9";
case F10KEY:
return "F10";
case F11KEY:
return "F11";
case F12KEY:
return "F12";
case PAUSEKEY:
return "Pause";
case INSERTKEY:
return "Insert";
case HOMEKEY:
return "Home";
case PAGEUPKEY:
return "Pageup";
case PAGEDOWNKEY:
return "Pagedown";
case ENDKEY:
return "End";
}
return "";