2012-07-20 02:10:44 -07:00
|
|
|
/* Copyright 2012 Mozilla Foundation and Mozilla contributors
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
2012-06-10 16:44:50 -07:00
|
|
|
|
|
|
|
#ifndef GONKKEYMAPPING_H
|
|
|
|
#define GONKKEYMAPPING_H
|
|
|
|
|
|
|
|
/* See libui/KeycodeLabels.h for the mapping */
|
|
|
|
static const unsigned long kKeyMapping[] = {
|
|
|
|
0,
|
|
|
|
0, // SOFT_LEFT
|
|
|
|
0, // SOFT_RIGHT
|
|
|
|
NS_VK_HOME, // HOME
|
2012-06-29 04:49:09 -07:00
|
|
|
0, // BACK
|
2012-06-10 16:44:50 -07:00
|
|
|
0, // CALL
|
2012-08-14 18:01:02 -07:00
|
|
|
NS_VK_SLEEP, // ENDCALL
|
2012-06-10 16:44:50 -07:00
|
|
|
NS_VK_0,
|
|
|
|
NS_VK_1,
|
|
|
|
NS_VK_2,
|
|
|
|
NS_VK_3,
|
|
|
|
NS_VK_4,
|
|
|
|
NS_VK_5,
|
|
|
|
NS_VK_6,
|
|
|
|
NS_VK_7,
|
|
|
|
NS_VK_8,
|
|
|
|
NS_VK_9,
|
|
|
|
NS_VK_ASTERISK,
|
|
|
|
NS_VK_HASH,
|
|
|
|
NS_VK_UP,
|
|
|
|
NS_VK_DOWN,
|
|
|
|
NS_VK_LEFT,
|
|
|
|
NS_VK_RIGHT,
|
|
|
|
NS_VK_SELECT,
|
|
|
|
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LASH,
|
|
|
|
NS_VK_AT,
|
|
|
|
0, // NUM
|
|
|
|
0, // HEADSETHOOK
|
|
|
|
0, // FOCUS
|
|
|
|
NS_VK_PLUS,
|
|
|
|
NS_VK_CONTEXT_MENU,
|
|
|
|
0, // NOTIFICATION
|
|
|
|
NS_VK_F5, // SEARCH
|
|
|
|
0, // MEDIA_PLAY_PAUSE
|
|
|
|
0, // MEDIA_STOP
|
|
|
|
0, // MEDIA_NEXT
|
|
|
|
0, // MEDIA_PREVIOUS
|
|
|
|
0, // MEDIA_REWIND
|
|
|
|
0, // MEDIA_FAST_FORWARD
|
|
|
|
0, // MUTE
|
|
|
|
0, // PAGE_UP
|
|
|
|
0, // PAGE_DOWN
|
|
|
|
0, // PICTSYMBOLS
|
|
|
|
0, // SWITCH_CHARSET
|
|
|
|
0, // BUTTON_A
|
|
|
|
0, // BUTTON_B
|
|
|
|
0, // BUTTON_C
|
|
|
|
0, // BUTTON_X
|
|
|
|
0, // BUTTON_Y
|
|
|
|
0, // BUTTON_Z
|
|
|
|
0, // BUTTON_L1
|
|
|
|
0, // BUTTON_R1
|
|
|
|
0, // BUTTON_L2
|
|
|
|
0, // BUTTON_R2
|
|
|
|
0, // BUTTON_THUMBL
|
|
|
|
0, // BUTTON_THUMBR
|
|
|
|
0, // BUTTON_START
|
|
|
|
0, // BUTTON_SELECT
|
|
|
|
0, // BUTTON_MODE
|
|
|
|
0, // ESCAPE
|
|
|
|
0, // FORWARD_DEL
|
|
|
|
0, // CTRL_LEFT
|
|
|
|
0, // CTRL_RIGHT
|
|
|
|
NS_VK_CAPS_LOCK,
|
|
|
|
NS_VK_SCROLL_LOCK,
|
|
|
|
0, // META_LEFT
|
|
|
|
0, // META_RIGHT
|
|
|
|
0, // FUNCTION
|
|
|
|
0, // SYSRQ
|
|
|
|
0, // BREAK
|
|
|
|
NS_VK_HOME, // MOVE_HOME
|
|
|
|
NS_VK_END,
|
|
|
|
NS_VK_INSERT,
|
|
|
|
0, // FORWARD
|
|
|
|
0, // MEDIA_PLAY
|
|
|
|
0, // MEDIA_PAUSE
|
|
|
|
0, // MEDIA_CLOSE
|
|
|
|
0, // MEDIA_EJECT
|
|
|
|
0, // MEDIA_RECORD
|
|
|
|
NS_VK_F1,
|
|
|
|
NS_VK_F2,
|
|
|
|
NS_VK_F3,
|
|
|
|
NS_VK_F4,
|
|
|
|
NS_VK_F5,
|
|
|
|
NS_VK_F6,
|
|
|
|
NS_VK_F7,
|
|
|
|
NS_VK_F8,
|
|
|
|
NS_VK_F9,
|
|
|
|
NS_VK_F10,
|
|
|
|
NS_VK_F11,
|
|
|
|
NS_VK_F12,
|
|
|
|
NS_VK_NUM_LOCK,
|
|
|
|
NS_VK_NUMPAD0,
|
|
|
|
NS_VK_NUMPAD1,
|
|
|
|
NS_VK_NUMPAD2,
|
|
|
|
NS_VK_NUMPAD3,
|
|
|
|
NS_VK_NUMPAD4,
|
|
|
|
NS_VK_NUMPAD5,
|
|
|
|
NS_VK_NUMPAD6,
|
|
|
|
NS_VK_NUMPAD7,
|
|
|
|
NS_VK_NUMPAD8,
|
|
|
|
NS_VK_NUMPAD9,
|
|
|
|
NS_VK_DIVIDE,
|
|
|
|
NS_VK_MULTIPLY,
|
|
|
|
NS_VK_SUBTRACT,
|
|
|
|
NS_VK_ADD,
|
|
|
|
NS_VK_PERIOD,
|
|
|
|
NS_VK_COMMA,
|
|
|
|
NS_VK_ENTER,
|
|
|
|
NS_VK_EQUALS,
|
|
|
|
// There are more but we don't map them
|
|
|
|
};
|
|
|
|
#endif /* GONKKEYMAPPING_H */
|