1/*
2 * Copyright 1999-2009 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		Jeremy Friesner
7 */
8#ifndef _KEY_INFOS_H
9#define _KEY_INFOS_H
10
11
12#include <String.h>
13#include <SupportDefs.h>
14
15
16// Returns an ASCII string for the given key index, or NULL if a bad code is
17// given.
18const char* GetKeyName(uint32 keyIndex);
19
20// Returns an ASCII string based on the given key code
21BString GetFallbackKeyName(uint32 keyCode);
22
23// Inverse of GetKeyName(). Finds the index of the given string. Returns 0 if
24// the string was not found in the set of key names.
25uint32 FindKeyCode(const char* keyName);
26
27// Returns the UTF8 value for the given key, or "\0" if none.
28const char* GetKeyUTF8(uint8 keyIndex);
29
30// Returns the number of key indices that are known. (Currently 256). Indices
31// (0...GetNumKeyIndices()-1) are valid.
32int GetNumKeyIndices();
33
34// Should be called at startup.
35void InitKeyIndices();
36
37
38#endif	// _KEY_INFOS_H
39