#
# SessionAutomationConstants.R
#
# Copyright (C) 2024 by Posit Software, PBC
#
# Unless you have received this program directly from Posit Software pursuant
# to the terms of a commercial license agreement with Posit Software, then
# this program is licensed to you under the terms of version 3 of the
# GNU Affero General Public License. This program is distributed WITHOUT
# ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
# AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
#
#

.rs.setVar("automationConstants.keyToKeyCodeMap", list(
   "backspace" = 8L,
   "tab"       = 9L,
   "enter"     = 13L,
   "shift"     = 16L,
   "ctrl"      = 17L,
   "alt"       = 18L,
   "pause"     = 19L,
   "capslock"  = 20L,
   "escape"    = 27L,
   "space"     = 32L,
   "pageup"    = 33L,
   "pagedown"  = 34L,
   "end"       = 35L,
   "home"      = 36L,
   "left"      = 37L,
   "up"        = 38L,
   "right"     = 39L,
   "down"      = 40L,
   "insert"    = 45L,
   "delete"    = 46L,
   "0"         = 48L,
   "1"         = 49L,
   "2"         = 50L,
   "3"         = 51L,
   "4"         = 52L,
   "5"         = 53L,
   "6"         = 54L,
   "7"         = 55L,
   "8"         = 56L,
   "9"         = 57L,
   "a"         = 65L,
   "b"         = 66L,
   "c"         = 67L,
   "d"         = 68L,
   "e"         = 69L,
   "f"         = 70L,
   "g"         = 71L,
   "h"         = 72L,
   "i"         = 73L,
   "j"         = 74L,
   "k"         = 75L,
   "l"         = 76L,
   "m"         = 77L,
   "n"         = 78L,
   "o"         = 79L,
   "p"         = 80L,
   "q"         = 81L,
   "r"         = 82L,
   "s"         = 83L,
   "t"         = 84L,
   "u"         = 85L,
   "v"         = 86L,
   "w"         = 87L,
   "x"         = 88L,
   "y"         = 89L,
   "z"         = 90L,
   "numpad0"   = 96L,
   "numpad1"   = 97L,
   "numpad2"   = 98L,
   "numpad3"   = 99L,
   "numpad4"   = 100L,
   "numpad5"   = 101L,
   "numpad6"   = 102L,
   "numpad7"   = 103L,
   "numpad8"   = 104L,
   "numpad9"   = 105L,
   "f1"        = 112L,
   "f2"        = 113L,
   "f3"        = 114L,
   "f4"        = 115L,
   "f5"        = 116L,
   "f6"        = 117L,
   "f7"        = 118L,
   "f8"        = 119L,
   "f9"        = 120L,
   "f10"       = 121L,
   "f11"       = 122L,
   "f12"       = 123L,
   ";"         = 186L,
   "="         = 187L,
   ","         = 188L,
   "-"         = 189L,
   "."         = 190L,
   "/"         = 191L,
   "`"         = 192L,
   "["         = 219L,
   "\\"        = 220L,
   "]"         = 221L,
   "'"         = 222L
))
