diff --git a/_includes/photon/usage.html b/_includes/photon/usage.html
index 75f9759..726330d 100644
--- a/_includes/photon/usage.html
+++ b/_includes/photon/usage.html
@@ -1,83 +1,76 @@
Using Photon
Keys/Controls
- - Toggle Emergency Lighting
+
- Lighting Toggle
- - Key: F
+ - F
- Turning off lights also deactivates the siren
- - Toggle Siren
+
- Siren Toggle
- - Key: R
+ - R
- If the lights are not active, the siren will default to the hightest priority light mode and enable emergency lights.
- - Change Light Pattern
+
- Lighting Mode
- - Illumination On/Off
+
- Illumination
- - Key: X
- - Short press
- - New feature, capable vehicles will show "ILLUM" on HUD
+ - Toggle: X
+ - Mode Switch: X🕑
+ - Capable vehicles will show "ILLUM" on HUD
- - Illumination Toggle
+
- Traffic Advisor
- - Key: X
- - Long press
+ - Toggle: B
+ - Mode Switch: B🕑
+ - Capable vehicles will show "AUXILIARY" on HUD
- - Traffic Advisor On/Off
+
+
- Siren Mode
-
- - Traffic Advisor Toggle Pattern
-
-
- - Change Siren Tone
-
- Manual Bullhorn
- Manual Siren
- - Key: T
+ - T
- Will sound the manual tone if it exists, otherwise it will use the wail tone.
- Blackout
- - Key: H
+ - H
- Disables head and marker lights for stealth work.
- - Signal Left
+
- Turn Signals
- - Left-Click + A
+ - Left: LMB + A
+ - Right: LMB + D
+ - Hazards: LMB + S
- - Signal Right
+
- Select Siren Tone
- - Left-Click + D
+ - 1, 2, 3, 4
+ - Select the given siren tone.
- - Hazards
+
- Toggle Radar HUD
diff --git a/assets/css/menu-photon.scss b/assets/css/menu-photon.scss
index e1e9267..2e5b35b 100644
--- a/assets/css/menu-photon.scss
+++ b/assets/css/menu-photon.scss
@@ -185,3 +185,34 @@ h4 {
code {
color: #9ba9b9
}
+
+.long-press {
+ &::before {
+ font-family: "Font Awesome 5 Free";
+ color: black;
+ font-weight: 900;
+ left: -2em;
+ position: absolute;
+ text-align: center;
+ width: 2em;
+ line-height: inherit;
+ content: "\f017";
+ }
+}
+
+kbd {
+ border: #404040 solid 1px;
+ border-top-color: darken(#404040, 10%);
+ font-family: monospace;
+ font-weight: bolder;
+ box-shadow: darken(#404040, 10%);
+ background-color: lighten(#404040, 65%);
+ border-radius: 4px;
+ color: black;
+ display: inline-block;
+ margin: 0 .1em;
+ overflow-wrap: break-word;
+ padding: .1em .6em;
+ text-shadow: #404040;
+}
+
diff --git a/assets/js/game.js b/assets/js/game.js
index 0f0540f..7d38c21 100644
--- a/assets/js/game.js
+++ b/assets/js/game.js
@@ -5,5 +5,189 @@ window.game = {
close: function(){
game.lua('ClosePhotonMenu()')
+ },
+
+ key_map: {
+ 1: "0",
+ 2: "1",
+ 3: "2",
+ 4: "3",
+ 5: "4",
+ 6: "5",
+ 7: "6",
+ 8: "7",
+ 9: "8",
+ 10: "9",
+ 11: "A",
+ 12: "B",
+ 13: "C",
+ 14: "D",
+ 15: "E",
+ 16: "F",
+ 17: "G",
+ 18: "H",
+ 19: "I",
+ 20: "J",
+ 21: "K",
+ 22: "L",
+ 23: "M",
+ 24: "N",
+ 25: "O",
+ 26: "P",
+ 27: "Q",
+ 28: "R",
+ 29: "S",
+ 30: "T",
+ 31: "U",
+ 32: "V",
+ 33: "W",
+ 34: "X",
+ 35: "Y",
+ 36: "Z",
+ 37: "0",
+ 38: "1",
+ 39: "2",
+ 40: "3",
+ 41: "4",
+ 42: "5",
+ 43: "6",
+ 44: "7",
+ 45: "8",
+ 46: "9",
+ 47: "/",
+ 48: "*",
+ 49: "-",
+ 50: "+",
+ 51: "ENTER",
+ 52: ".",
+ 53: "[",
+ 54: "]",
+ 55: ";",
+ 56: "'",
+ 57: "`",
+ 58: ",",
+ 59: ".",
+ 60: "/",
+ 61: "\\",
+ 62: "-",
+ 63: "=",
+ 64: "ENTER",
+ 65: "SPACE",
+ 66: "⌫",
+ 67: "⭾",
+ 68: "CAPS",
+ 69: "NUMLOCK",
+ 70: "ESC",
+ 71: "SCRL_LOCK",
+ 72: "INS",
+ 73: "DEL",
+ 74: "HOME",
+ 75: "END",
+ 76: "PGUP",
+ 77: "PGDN",
+ 78: "PAUSE",
+ 79: "SHIFT",
+ 80: "RSHIFT",
+ 81: "ALT",
+ 82: "RALT",
+ 83: "CTRL",
+ 84: "RCTRL",
+ 85: "LWIN",
+ 86: "RWIN",
+ 87: "APP",
+ 88: "↑",
+ 89: "←",
+ 90: "↓",
+ 91: "→",
+ 92: "F1",
+ 93: "F2",
+ 94: "F3",
+ 95: "F4",
+ 96: "F5",
+ 97: "F6",
+ 98: "F7",
+ 99: "F8",
+ 100: "F9",
+ 101: "F10",
+ 102: "F11",
+ 103: "F12",
+ 104: "CAPS_TOGGLE",
+ 105: "NUM_LOCK_TOGGLE",
+ 106: "SCROLL_TOGGLE",
+ 107: "LMB",
+ 108: "RMB",
+ 109: "M3",
+ 110: "M4",
+ 111: "M5",
+ 112: "SCROLL_UP",
+ 113: "SCROLL_DOWN",
+ 114: "JOY1",
+ 115: "JOY2",
+ 116: "JOY3",
+ 117: "JOY4",
+ 118: "JOY5",
+ 119: "JOY6",
+ 120: "JOY7",
+ 121: "JOY8",
+ 122: "JOY9",
+ 123: "JOY10",
+ 124: "JOY11",
+ 125: "JOY12",
+ 126: "JOY13",
+ 127: "JOY14",
+ 128: "JOY15",
+ 129: "JOY16",
+ 130: "JOY17",
+ 131: "JOY18",
+ 132: "JOY19",
+ 133: "JOY20",
+ 134: "JOY21",
+ 135: "JOY22",
+ 136: "JOY23",
+ 137: "JOY24",
+ 138: "JOY25",
+ 139: "JOY26",
+ 140: "JOY27",
+ 141: "JOY28",
+ 142: "JOY29",
+ 143: "JOY30",
+ 144: "JOY31",
+ 145: "JOY32",
+ 146: "JOY1",
+ 147: "JOY2",
+ 148: "JOY3",
+ 149: "JOY4",
+ 150: "JOY5",
+ 151: "JOY6",
+ 152: "JOY7",
+ 153: "JOY8",
+ 154: "JOY9",
+ 155: "JOY10",
+ 156: "JOY11",
+ 157: "JOY12",
+ 158: "JOY13",
+ 159: "JOY14",
+ },
+
+ get_key: function(command){
+ game.lua('PhotonWebPage:QueueJavascript([[game.get_key_callback("' + command + '", ]] .. GetConVar("' + command + '"):GetInt() .. [[)]])')
+ },
+
+ get_key_callback: function(command, code){
+ if (code === "nil"){
+ return
+ }
+
+ code = parseInt(code)
+ $(`[data-bind="${command}"]`).each(function(_, element){
+ element.innerText = game.key_map[code]
+ $(element).attr('data-code', code)
+ })
}
}
+
+$(document).ready(function(){
+ $("[data-bind]").each(function(_, element){
+ game.get_key(element.attributes['data-bind'].value)
+ })
+})