/* +------------------------------------------------------------------------+
   |                     Mobile Robot Programming Toolkit (MRPT)            |
   |                          https://www.mrpt.org/                         |
   |                                                                        |
   | Copyright (c) 2005-2022, Individual contributors, see AUTHORS file     |
   | See: https://www.mrpt.org/Authors - All rights reserved.               |
   | Released under BSD License. See: https://www.mrpt.org/License          |
   +------------------------------------------------------------------------+ */
#pragma once

#include <mrpt/config.h>

namespace mrpt::gui
{
// These key codes are an exact replication of those of wxWidgets.
//  They are defined within MRPT for convenience, since users don't have to
//  install
//  wxWidgets in order to build MRPT applications.
//  See: http://docs.wxwidgets.org/stable/wx_keycodes.html

/*  Virtual keycodes */
enum mrptKeyCode
{
	MRPTK_BACK = 8,
	MRPTK_TAB = 9,
	MRPTK_RETURN = 13,
	MRPTK_ESCAPE = 27,
	MRPTK_SPACE = 32,
	MRPTK_DELETE = 127,

	MRPTK_START = 300,
	MRPTK_LBUTTON,
	MRPTK_RBUTTON,
	MRPTK_CANCEL,
	MRPTK_MBUTTON,
	MRPTK_CLEAR,
	MRPTK_SHIFT,
	MRPTK_ALT,
	MRPTK_CONTROL,
	MRPTK_MENU,
	MRPTK_PAUSE,
	MRPTK_CAPITAL,
	MRPTK_END,
	MRPTK_HOME,
	MRPTK_LEFT,
	MRPTK_UP,
	MRPTK_RIGHT,
	MRPTK_DOWN,
	MRPTK_SELECT,
	MRPTK_PRINT,
	MRPTK_EXECUTE,
	MRPTK_SNAPSHOT,
	MRPTK_INSERT,
	MRPTK_HELP,
	MRPTK_NUMPAD0,
	MRPTK_NUMPAD1,
	MRPTK_NUMPAD2,
	MRPTK_NUMPAD3,
	MRPTK_NUMPAD4,
	MRPTK_NUMPAD5,
	MRPTK_NUMPAD6,
	MRPTK_NUMPAD7,
	MRPTK_NUMPAD8,
	MRPTK_NUMPAD9,
	MRPTK_MULTIPLY,
	MRPTK_ADD,
	MRPTK_SEPARATOR,
	MRPTK_SUBTRACT,
	MRPTK_DECIMAL,
	MRPTK_DIVIDE,
	MRPTK_F1,
	MRPT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PTK_SPECIAL8,
	MRPTK_SPECIAL9,
	MRPTK_SPECIAL10,
	MRPTK_SPECIAL11,
	MRPTK_SPECIAL12,
	MRPTK_SPECIAL13,
	MRPTK_SPECIAL14,
	MRPTK_SPECIAL15,
	MRPTK_SPECIAL16,
	MRPTK_SPECIAL17,
	MRPTK_SPECIAL18,
	MRPTK_SPECIAL19,
	MRPTK_SPECIAL20
};

/* This enum contains bit mask constants used in wxKeyEvent */
enum mrptKeyModifier
{
	MRPTKMOD_NONE = 0x0000,
	MRPTKMOD_ALT = 0x1000,
	MRPTKMOD_CONTROL = 0x2000,
	MRPTKMOD_ALTGR = MRPTKMOD_ALT | MRPTKMOD_CONTROL,
	MRPTKMOD_SHIFT = 0x4000,
	MRPTKMOD_META = 0x8000,
	MRPTKMOD_WIN = MRPTKMOD_META,
#ifdef __APPLE__
	MRPTKMOD_CMD = MRPTKMOD_META
#else
	MRPTKMOD_CMD = MRPTKMOD_CONTROL
#endif
};

}  // namespace mrpt::gui
