Prelimiary upload for build 81

pull/104/head
bm98 4 years ago
parent 7b1ae5a052
commit 1ea8acfc79

@ -0,0 +1,253 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using SharpDX.DirectInput;
namespace SCJMapper_V2.Common
{
static class WinApi
{
public const string LibraryName = "user32";
internal static class Properties
{
#if !ANSI
public const CharSet BuildCharSet = CharSet.Unicode;
#else
public const CharSet BuildCharSet = CharSet.Ansi;
#endif
}
/// <summary>
/// The set of valid MapTypes used in MapVirtualKey
/// </summary>
public enum VirtualKeyMapType
{
/// <summary>
/// The uCode parameter is a virtual-key code and is translated into a scan code.
/// If it is a virtual-key code that does not distinguish between left- and right-hand keys,
/// the left-hand scan code is returned.
/// If there is no translation, the function returns 0.
/// </summary>
MAPVK_VK_TO_VSC = 0x0,
/// <summary>
/// The uCode parameter is a scan code and is translated into a virtual-key code that does
/// not distinguish between left- and right-hand keys.
/// If there is no translation, the function returns 0.
/// </summary>
MAPVK_VSC_TO_VK = 0x1,
/// <summary>
/// The uCode parameter is a virtual-key code and is translated into an unshifted character
/// value in the low order word of the return value. Dead keys (diacritics) are indicated
/// by setting the top bit of the return value.
/// If there is no translation, the function returns 0.
/// </summary>
MAPVK_VK_TO_CHAR = 0x2,
/// <summary>
/// The uCode parameter is a scan code and is translated into a virtual-key code that
/// distinguishes between left- and right-hand keys.
/// If there is no translation, the function returns 0.
/// </summary>
MAPVK_VSC_TO_VK_EX = 0x3,
/// <summary>
/// The uCode parameter is a virtual-key code and is translated into a scan code.
/// If it is a virtual-key code that does not distinguish between left- and right-hand keys,
/// the left-hand scan code is returned. If the scan code is an extended scan code,
/// the high byte of the uCode value can contain either 0xe0 or 0xe1 to specify the extended scan code.
/// If there is no translation, the function returns 0.
/// </summary>
MAPVK_VK_TO_VSC_EX = 0x4,
}
/// <summary>
/// Translates (maps) a virtual-key code into a scan code or character value,
/// or translates a scan code into a virtual-key code.
/// The function translates the codes using the input language and an input locale identifier.
///
/// NOTE: DX Keycodes are VSC codes (Scan Codes)
/// </summary>
/// <param name="uCode">Scan code for a key.
/// Starting with Windows Vista, the high byte of the uCode value can contain
/// either 0xe0 or 0xe1 to specify the extended scan code.
/// </param>
/// <param name="uMapType">MAPVK_VSC_TO_VK, MAPVK_VSC_TO_VK_EX</param>
/// <param name="dwhkl">nput locale identifier to use for translating the specified code.</param>
/// <returns>Either a scan code, a virtual-key code, or a character value,
/// depending on the value of uCode and uMapType.
/// If there is no translation, the return value is zero.
/// </returns>
[DllImport( LibraryName, CharSet = Properties.BuildCharSet )]
public static extern uint MapVirtualKeyEx( uint uCode, VirtualKeyMapType uMapType, IntPtr dwhkl );
/// <summary>
/// Translates (maps) a virtual-key code into a scan code or character value,
/// or translates a scan code into a virtual-key code.
/// The function translates the codes using the input language and an input locale identifier.
///
/// NOTE: DX Keycodes are VSC codes
/// </summary>
/// <param name="uCode">The virtual-key code for a key.
/// Starting with Windows Vista, the high byte of the uCode value can contain
/// either 0xe0 or 0xe1 to specify the extended scan code.
/// </param>
/// <param name="uMapType">MAPVK_VK_TO_VSC, MAPVK_VK_TO_CHAR, MAPVK_VK_TO_VSC_EX </param>
/// <param name="dwhkl">nput locale identifier to use for translating the specified code.</param>
/// <returns>Either a scan code, a virtual-key code, or a character value,
/// depending on the value of uCode and uMapType.
/// If there is no translation, the return value is zero.
/// </returns>
[DllImport( LibraryName, CharSet = Properties.BuildCharSet )]
public static extern uint MapVirtualKeyEx( VirtualKey uCode, VirtualKeyMapType uMapType, IntPtr dwhkl );
/// <summary>
/// The above does not work great - cannot get Navigation buttons, returns Numpad as Navig. e.g. NumLock OFF (seems to be stuck with the OLD DOS PC Keyboard layout...)
/// We only need the Alpha Keyboard to be translated by the MS routine..
/// </summary>
/// <param name="uCode">The ScanCode</param>
/// <param name="uMapType"></param>
/// <param name="dwhkl"></param>
/// <returns></returns>
public static string KbdScanCodeToVK( uint uCode )
{
switch ( uCode ) {
// handle modifiers first
case (uint)Key.LeftAlt: return "LAlt";
case (uint)Key.RightAlt: return "RAlt";
case (uint)Key.LeftShift: return "LShift";
case (uint)Key.RightShift: return "RShift";
case (uint)Key.LeftControl: return "LCtrl";
case (uint)Key.RightControl: return "RCtrl";
// all keys where the DX name does not match the SC name
// Numpad
case (uint)Key.NumberLock: return "N.Lck";
case (uint)Key.Divide: return "NP /";
case (uint)Key.Multiply: return "NP *";
case (uint)Key.Subtract: return "NP -";
case (uint)Key.Add: return "NP +";
case (uint)Key.Decimal: return "NP .";
case (uint)Key.NumberPadEnter: return "NP ←┘";
case (uint)Key.NumberPad0: return "NP 0";
case (uint)Key.NumberPad1: return "NP 1";
case (uint)Key.NumberPad2: return "NP 2";
case (uint)Key.NumberPad3: return "NP 3";
case (uint)Key.NumberPad4: return "NP 4";
case (uint)Key.NumberPad5: return "NP 5";
case (uint)Key.NumberPad6: return "NP 6";
case (uint)Key.NumberPad7: return "NP 7";
case (uint)Key.NumberPad8: return "NP 8";
case (uint)Key.NumberPad9: return "NP 9";
// Digits
case (uint)Key.D0: return "0";
case (uint)Key.D1: return "1";
case (uint)Key.D2: return "2";
case (uint)Key.D3: return "3";
case (uint)Key.D4: return "4";
case (uint)Key.D5: return "5";
case (uint)Key.D6: return "6";
case (uint)Key.D7: return "7";
case (uint)Key.D8: return "8";
case (uint)Key.D9: return "9";
// navigation
case (uint)Key.Insert: return "Ins";
case (uint)Key.Home: return "⸠◄9";
case (uint)Key.Delete: return "Del";
case (uint)Key.End: return "►⸡";
case (uint)Key.PageUp: return "Pg▲";
case (uint)Key.PageDown: return "Pg▼";
case (uint)Key.PrintScreen: return "PrtScr";
case (uint)Key.ScrollLock: return "ScrlLck";
case (uint)Key.Pause: return "Pause";
// Arrows
case (uint)Key.Up: return "↑";
case (uint)Key.Down: return "↓";
case (uint)Key.Left: return "←";
case (uint)Key.Right: return "→";
// non letters
case (uint)Key.Period: return ".";
case (uint)Key.Minus: return "-";
case (uint)Key.Equals: return "=";
case (uint)Key.Return: return "←┘";
/*
case (uint)Key.Grave: return "^";
case (uint)Key.Escape: return "→";
case (uint)Key.Underline: key += "underline+"; break;
case (uint)Key.Back: key += "backspace+"; break;
case (uint)Key.Tab: key += "tab+"; break;
case (uint)Key.LeftBracket: key += "lbracket+"; break;
case (uint)Key.RightBracket: key += "rbracket+"; break;
case (uint)Key.Capital: key += "capslock+"; break;
case (uint)Key.Colon: key += "colon+"; break;
case (uint)Key.Backslash: key += "backslash+"; break;
case (uint)Key.Comma: key += "comma+"; break;
case (uint)Key.Slash: key += "slash+"; break;
case (uint)Key.Space: key += "space+"; break;
case (uint)Key.Semicolon: key += "semicolon+"; break;
case (uint)Key.Apostrophe: key += "apostrophe+"; break;
*/
// all where the lowercase DX name matches the SC name
default:
uint vKeyCode = MapVirtualKeyEx( uCode, VirtualKeyMapType.MAPVK_VSC_TO_VK_EX, IntPtr.Zero );
string key = ( (System.Windows.Forms.Keys)vKeyCode ).ToString( );
if ( key.StartsWith( "Oem" ) ) {
key = GetCharFromKey( vKeyCode ); // try this ...
}
return key;
}
}
[DllImport( LibraryName, ExactSpelling = true )]
public static extern uint ToAscii( uint uVirtKey, uint uScanCode, [MarshalAs( UnmanagedType.LPArray, SizeConst = 256 )] byte[] lpbKeyState, out uint lpwTransKey, uint uFlags );
[DllImport( LibraryName, ExactSpelling = true )]
public static extern uint ToUnicode( uint wVirtKey, uint wScanCode, [MarshalAs( UnmanagedType.LPArray, SizeConst = 256 )] byte[] lpbKeyState, out uint pwszBuff, int cchBuff, uint uFlags );
[DllImport( LibraryName, ExactSpelling = true )]
public static extern bool GetKeyboardState( [MarshalAs( UnmanagedType.LPArray, SizeConst = 256 )] out byte[] lpKeyState );
[DllImport( LibraryName, ExactSpelling = true )]
[return: MarshalAs( UnmanagedType.Bool )]
static extern bool GetKeyboardState( byte[] lpKeyState );
[DllImport( LibraryName, ExactSpelling = true )]
public static extern bool GetKeyboardState( IntPtr lpKeyState );
public static string GetCharFromKey( uint virtKeyCode )
{
byte[] keyBoardState = new byte[256];
if ( GetKeyboardState( keyBoardState ) ) {
if ( ToAscii( virtKeyCode, 0, keyBoardState, out uint outChar, 0 ) < 0 ) {
// dead key i.e. not a pressed one
if ( outChar <= 255 ) {
return ( (char)outChar ).ToString( );
}
else {
//return Microsoft.VisualBasic.Left(StrConv(ChrW(Out), vbUnicode), 1)
//return Microsoft.VisualBasic.Left(StrConv(ChrW(Out), VbStrConv.None), 1)
return ( (char)outChar ).ToString( );
}
}
else {
return ( (char)outChar ).ToString( );
}
}
else {
return "";
}
}
}
}

@ -0,0 +1,671 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SCJMapper_V2.Common
{
// From winuser.h
//
[Flags]
public enum KeyModifierFlags
{
/// <summary>
/// Either ALT key must be held down.
/// </summary>
MOD_ALT = 0x0001,
/// <summary>
/// Either CTRL key must be held down.
/// </summary>
MOD_CONTROL = 0x0002,
/// <summary>
/// Changes the hotkey behavior so that the keyboard auto-repeat does not yield multiple hotkey notifications.
/// Windows Vista: This flag is not supported.
/// </summary>
MOD_NOREPEAT = 0x4000,
/// <summary>
/// Either SHIFT key must be held down.
/// </summary>
MOD_SHIFT = 0x0004,
/// <summary>
/// Either WINDOWS key was held down. These keys are labeled with the Windows logo. Keyboard shortcuts that involve the
/// WINDOWS key are reserved for use by the operating system.
/// </summary>
MOD_WIN = 0x0008
}
[Flags]
public enum MouseInputKeyStateFlags
{
/// <summary>
/// The CTRL key is down.
/// </summary>
MK_CONTROL = 0x0008,
/// <summary>
/// The left mouse button is down.
/// </summary>
MK_LBUTTON = 0x0001,
/// <summary>
/// The middle mouse button is down.
/// </summary>
MK_MBUTTON = 0x0010,
/// <summary>
/// The right mouse button is down.
/// </summary>
MK_RBUTTON = 0x0002,
/// <summary>
/// The SHIFT key is down.
/// </summary>
MK_SHIFT = 0x0004,
/// <summary>
/// The first X button is down.
/// </summary>
MK_XBUTTON1 = 0x0020,
/// <summary>
/// The second X button is down.
/// </summary>
MK_XBUTTON2 = 0x0040
}
[Flags]
public enum HotKeyInputState
{
/// <summary>
/// Either ALT key was held down.
/// </summary>
MOD_ALT = 0x0001,
/// <summary>
/// Either CTRL key was held down.
/// </summary>
MOD_CONTROL = 0x0002,
/// <summary>
/// Either SHIFT key was held down.
/// </summary>
MOD_SHIFT = 0x0004,
/// <summary>
/// Either WINDOWS key was held down. These keys are labeled with the Windows logo. Hotkeys that involve the Windows
/// key are reserved for use by the operating system.
/// </summary>
MOD_WIN = 0x0008
}
[Flags]
public enum MouseInputXButtonFlag
{
/// <summary>
/// The first X button was clicked.
/// </summary>
XBUTTON1 = 0x0001,
/// <summary>
/// The second X button was clicked.
/// </summary>
XBUTTON2 = 0x0002
}
[Flags]
public enum MouseInputFlags
{
/// <summary>
/// The dx and dy members contain normalized absolute coordinates. If the flag is not set, dxand dy contain relative
/// data (the change in position since the last reported position). This flag can be set, or not set, regardless of
/// what kind of mouse or other pointing device, if any, is connected to the system. For further information about
/// relative mouse motion, see the following Remarks section.
/// </summary>
MOUSEEVENTF_ABSOLUTE = 0x8000,
/// <summary>
/// The wheel was moved horizontally, if the mouse has a wheel. The amount of movement is specified in mouseData.
/// Windows XP/2000: This value is not supported.
/// </summary>
MOUSEEVENTF_HWHEEL = 0x01000,
/// <summary>
/// Movement occurred.
/// </summary>
MOUSEEVENTF_MOVE = 0x0001,
/// <summary>
/// The WM_MOUSEMOVE messages will not be coalesced. The default behavior is to coalesce WM_MOUSEMOVE messages.
/// Windows XP/2000: This value is not supported.
/// </summary>
MOUSEEVENTF_MOVE_NOCOALESCE = 0x2000,
/// <summary>
/// The left button was pressed.
/// </summary>
MOUSEEVENTF_LEFTDOWN = 0x0002,
/// <summary>
/// The left button was released.
/// </summary>
MOUSEEVENTF_LEFTUP = 0x0004,
/// <summary>
/// The right button was pressed.
/// </summary>
MOUSEEVENTF_RIGHTDOWN = 0x0008,
/// <summary>
/// The right button was released.
/// </summary>
MOUSEEVENTF_RIGHTUP = 0x0010,
/// <summary>
/// The middle button was pressed.
/// </summary>
MOUSEEVENTF_MIDDLEDOWN = 0x0020,
/// <summary>
/// The middle button was released.
/// </summary>
MOUSEEVENTF_MIDDLEUP = 0x0040,
/// <summary>
/// Maps coordinates to the entire desktop. Must be used with MOUSEEVENTF_ABSOLUTE.
/// </summary>
MOUSEEVENTF_VIRTUALDESK = 0x4000,
/// <summary>
/// The wheel was moved, if the mouse has a wheel. The amount of movement is specified in mouseData.
/// </summary>
MOUSEEVENTF_WHEEL = 0x0800,
/// <summary>
/// An X button was pressed.
/// </summary>
MOUSEEVENTF_XDOWN = 0x0080,
/// <summary>
/// An X button was released.
/// </summary>
MOUSEEVENTF_XUP = 0x0100
}
[Flags]
public enum KeyboardInputFlags
{
/// <summary>
/// If specified, the scan code was preceded by a prefix byte that has the value 0xE0 (224).
/// </summary>
KEYEVENTF_EXTENDEDKEY = 0x0001,
/// <summary>
/// If specified, the key is being released. If not specified, the key is being pressed.
/// </summary>
KEYEVENTF_KEYUP = 0x0002,
/// <summary>
/// If specified, wScan identifies the key and wVk is ignored.
/// </summary>
KEYEVENTF_SCANCODE = 0x0008,
/// <summary>
/// If specified, the system synthesizes a VK_PACKET keystroke. The wVk parameter must be zero. This flag can only be
/// combined with the KEYEVENTF_KEYUP flag. For more information, see the Remarks section.
/// </summary>
KEYEVENTF_UNICODE = 0x0004
}
[Flags]
public enum CursorInfoFlags
{
/// <summary>
/// The cursor is showing.
/// </summary>
CURSOR_SHOWING = 0x00000001,
/// <summary>
/// Windows 8: The cursor is suppressed. This flag indicates that the system is not drawing the cursor because the user
/// is providing input through touch or pen instead of the mouse.
/// </summary>
CURSOR_SUPPRESSED = 0x00000002
}
public enum InputType
{
/// <summary>
/// The event is a mouse event. Use the mi structure of the union.
/// </summary>
INPUT_MOUSE = 0,
/// <summary>
/// The event is a keyboard event. Use the ki structure of the union.
/// </summary>
INPUT_KEYBOARD = 1,
/// <summary>
/// The event is a hardware event. Use the hi structure of the union.
/// </summary>
INPUT_HARDWARE = 2
}
public enum VirtualKeyMapType
{
/// <summary>
/// The uCode parameter is a virtual-key code and is translated into an unshifted character value in the low order word
/// of the return value. Dead keys (diacritics) are indicated by setting the top bit of the return value. If there is
/// no translation, the function returns 0.
/// </summary>
MAPVK_VK_TO_CHAR = 2,
/// <summary>
/// The uCode parameter is a virtual-key code and is translated into a scan code. If it is a virtual-key code that does
/// not distinguish between left- and right-hand keys, the left-hand scan code is returned. If there is no translation,
/// the function returns 0.
/// </summary>
MAPVK_VK_TO_VSC = 0,
/// <summary>
/// The uCode parameter is a virtual-key code and is translated into a scan code. If it is a virtual-key code that does
/// not distinguish between left- and right-hand keys, the left-hand scan code is returned. If the scan code is an
/// extended scan code, the high byte of the uCode value can contain either 0xe0 or 0xe1 to specify the extended scan
/// code. If there is no translation, the function returns 0.
/// </summary>
MAPVK_VK_TO_VSC_EX = 4,
/// <summary>
/// The uCode parameter is a scan code and is translated into a virtual-key code that does not distinguish between
/// left- and right-hand keys. If there is no translation, the function returns 0.
/// </summary>
MAPVK_VSC_TO_VK = 1,
/// <summary>
/// The uCode parameter is a scan code and is translated into a virtual-key code that distinguishes between left- and
/// right-hand keys. If there is no translation, the function returns 0.
/// </summary>
MAPVK_VSC_TO_VK_EX = 3
}
public enum VirtualKey
{
LBUTTON = 0x01,
RBUTTON = 0x02,
CANCEL = 0x03,
MBUTTON = 0x04 /* NOT contiguous with L & RBUTTON */,
XBUTTON1 = 0x05 /* NOT contiguous with L & RBUTTON */,
XBUTTON2 = 0x06 /* NOT contiguous with L & RBUTTON */,
BACK = 0x08,
TAB = 0x09,
CLEAR = 0x0C,
RETURN = 0x0D,
SHIFT = 0x10,
CONTROL = 0x11,
MENU = 0x12,
PAUSE = 0x13,
CAPITAL = 0x14,
KANA = 0x15,
HANGEUL = 0x15 /* old name - should be here for compatibility */,
HANGUL = 0x15,
JUNJA = 0x17,
FINAL = 0x18,
HANJA = 0x19,
KANJI = 0x19,
ESCAPE = 0x1B,
CONVERT = 0x1C,
NONCONVERT = 0x1D,
ACCEPT = 0x1E,
MODECHANGE = 0x1F,
SPACE = 0x20,
PRIOR = 0x21,
NEXT = 0x22,
END = 0x23,
HOME = 0x24,
LEFT = 0x25,
UP = 0x26,
RIGHT = 0x27,
DOWN = 0x28,
SELECT = 0x29,
PRINT = 0x2A,
EXECUTE = 0x2B,
SNAPSHOT = 0x2C,
INSERT = 0x2D,
DELETE = 0x2E,
HELP = 0x2F,
LWIN = 0x5B,
RWIN = 0x5C,
APPS = 0x5D,
SLEEP = 0x5F,
NUMPAD0 = 0x60,
NUMPAD1 = 0x61,
NUMPAD2 = 0x62,
NUMPAD3 = 0x63,
NUMPAD4 = 0x64,
NUMPAD5 = 0x65,
NUMPAD6 = 0x66,
NUMPAD7 = 0x67,
NUMPAD8 = 0x68,
NUMPAD9 = 0x69,
MULTIPLY = 0x6A,
ADD = 0x6B,
SEPARATOR = 0x6C,
SUBTRACT = 0x6D,
DECIMAL = 0x6E,
DIVIDE = 0x6F,
F1 = 0x70,
F2 = 0x71,
F3 = 0x72,
F4 = 0x73,
F5 = 0x74,
F6 = 0x75,
F7 = 0x76,
F8 = 0x77,
F9 = 0x78,
F10 = 0x79,
F11 = 0x7A,
F12 = 0x7B,
F13 = 0x7C,
F14 = 0x7D,
F15 = 0x7E,
F16 = 0x7F,
F17 = 0x80,
F18 = 0x81,
F19 = 0x82,
F20 = 0x83,
F21 = 0x84,
F22 = 0x85,
F23 = 0x86,
F24 = 0x87,
NUMLOCK = 0x90,
SCROLL = 0x91,
OEM_NEC_EQUAL = 0x92, // '=' key on numpad,
OEM_FJ_JISHO = 0x92, // 'Dictionary' key,
OEM_FJ_MASSHOU = 0x93, // 'Unregister word' key,
OEM_FJ_TOUROKU = 0x94, // 'Register word' key,
OEM_FJ_LOYA = 0x95, // 'Left OYAYUBI' key,
OEM_FJ_ROYA = 0x96, // 'Right OYAYUBI' key,
LSHIFT = 0xA0,
RSHIFT = 0xA1,
LCONTROL = 0xA2,
RCONTROL = 0xA3,
LMENU = 0xA4,
RMENU = 0xA5,
BROWSER_BACK = 0xA6,
BROWSER_FORWARD = 0xA7,
BROWSER_REFRESH = 0xA8,
BROWSER_STOP = 0xA9,
BROWSER_SEARCH = 0xAA,
BROWSER_FAVORITES = 0xAB,
BROWSER_HOME = 0xAC,
VOLUME_MUTE = 0xAD,
VOLUME_DOWN = 0xAE,
VOLUME_UP = 0xAF,
MEDIA_NEXT_TRACK = 0xB0,
MEDIA_PREV_TRACK = 0xB1,
MEDIA_STOP = 0xB2,
MEDIA_PLAY_PAUSE = 0xB3,
LAUNCH_MAIL = 0xB4,
LAUNCH_MEDIA_SELECT = 0xB5,
LAUNCH_APP1 = 0xB6,
LAUNCH_APP2 = 0xB7,
OEM_1 = 0xBA, // ';:' for US,
OEM_PLUS = 0xBB, // '+' any country,
OEM_COMMA = 0xBC, // ',' any country,
OEM_MINUS = 0xBD, // '-' any country,
OEM_PERIOD = 0xBE, // '.' any country,
OEM_2 = 0xBF, // '/?' for US,
OEM_3 = 0xC0, // '`~' for US,
OEM_4 = 0xDB, // '[{' for US,
OEM_5 = 0xDC, // '\|' for US,
OEM_6 = 0xDD, // ']}' for US,
OEM_7 = 0xDE, // ''"' for US,
OEM_8 = 0xDF,
OEM_AX = 0xE1, // 'AX' key on Japanese AX kbd,
OEM_102 = 0xE2, // "<>" or "\|" on RT 102-key kbd.,
ICO_HELP = 0xE3, // Help key on ICO,
ICO_00 = 0xE4, // 00 key on ICO,
PROCESSKEY = 0xE5,
ICO_CLEAR = 0xE6,
PACKET = 0xE7,
OEM_RESET = 0xE9,
OEM_JUMP = 0xEA,
OEM_PA1 = 0xEB,
OEM_PA2 = 0xEC,
OEM_PA3 = 0xED,
OEM_WSCTRL = 0xEE,
OEM_CUSEL = 0xEF,
OEM_ATTN = 0xF0,
OEM_FINISH = 0xF1,
OEM_COPY = 0xF2,
OEM_AUTO = 0xF3,
OEM_ENLW = 0xF4,
OEM_BACKTAB = 0xF5,
ATTN = 0xF6,
CRSEL = 0xF7,
EXSEL = 0xF8,
EREOF = 0xF9,
PLAY = 0xFA,
ZOOM = 0xFB,
NONAME = 0xFC,
PA1 = 0xFD,
OEM_CLEAR = 0xFE,
A = 0x41,
B = 0x42,
C = 0x43,
D = 0x44,
E = 0x45,
F = 0x46,
G = 0x47,
H = 0x48,
I = 0x49,
J = 0x4a,
K = 0x4b,
L = 0x4c,
M = 0x4d,
N = 0x4e,
O = 0x4f,
P = 0x50,
Q = 0x51,
R = 0x52,
S = 0x53,
T = 0x54,
U = 0x55,
V = 0x56,
W = 0x57,
X = 0x58,
Y = 0x59,
Z = 0x5a,
D0 = 0x30,
D1 = 0x31,
D2 = 0x32,
D3 = 0x33,
D4 = 0x34,
D5 = 0x35,
D6 = 0x36,
D7 = 0x37,
D8 = 0x38,
D9 = 0x39
}
public enum ScanCodes
{
LBUTTON = 0,
RBUTTON = 0,
CANCEL = 70,
MBUTTON = 0,
XBUTTON1 = 0,
XBUTTON2 = 0,
BACK = 14,
TAB = 15,
CLEAR = 76,
RETURN = 28,
SHIFT = 42,
CONTROL = 29,
MENU = 56,
PAUSE = 0,
CAPITAL = 58,
KANA = 0,
HANGUL = 0,
JUNJA = 0,
FINAL = 0,
HANJA = 0,
KANJI = 0,
ESCAPE = 1,
CONVERT = 0,
NONCONVERT = 0,
ACCEPT = 0,
MODECHANGE = 0,
SPACE = 57,
PRIOR = 73,
NEXT = 81,
END = 79,
HOME = 71,
LEFT = 75,
UP = 72,
RIGHT = 77,
DOWN = 80,
SELECT = 0,
PRINT = 0,
EXECUTE = 0,
SNAPSHOT = 84,
INSERT = 82,
DELETE = 83,
HELP = 99,
KEY_0 = 11,
KEY_1 = 2,
KEY_2 = 3,
KEY_3 = 4,
KEY_4 = 5,
KEY_5 = 6,
KEY_6 = 7,
KEY_7 = 8,
KEY_8 = 9,
KEY_9 = 10,
KEY_A = 30,
KEY_B = 48,
KEY_C = 46,
KEY_D = 32,
KEY_E = 18,
KEY_F = 33,
KEY_G = 34,
KEY_H = 35,
KEY_I = 23,
KEY_J = 36,
KEY_K = 37,
KEY_L = 38,
KEY_M = 50,
KEY_N = 49,
KEY_O = 24,
KEY_P = 25,
KEY_Q = 16,
KEY_R = 19,
KEY_S = 31,
KEY_T = 20,
KEY_U = 22,
KEY_V = 47,
KEY_W = 17,
KEY_X = 45,
KEY_Y = 21,
KEY_Z = 44,
LWIN = 91,
RWIN = 92,
APPS = 93,
SLEEP = 95,
NUMPAD0 = 82,
NUMPAD1 = 79,
NUMPAD2 = 80,
NUMPAD3 = 81,
NUMPAD4 = 75,
NUMPAD5 = 76,
NUMPAD6 = 77,
NUMPAD7 = 71,
NUMPAD8 = 72,
NUMPAD9 = 73,
MULTIPLY = 55,
ADD = 78,
SEPARATOR = 0,
SUBTRACT = 74,
DECIMAL = 83,
DIVIDE = 53,
F1 = 59,
F2 = 60,
F3 = 61,
F4 = 62,
F5 = 63,
F6 = 64,
F7 = 65,
F8 = 66,
F9 = 67,
F10 = 68,
F11 = 87,
F12 = 88,
F13 = 100,
F14 = 101,
F15 = 102,
F16 = 103,
F17 = 104,
F18 = 105,
F19 = 106,
F20 = 107,
F21 = 108,
F22 = 109,
F23 = 110,
F24 = 118,
NUMLOCK = 69,
SCROLL = 70,
LSHIFT = 42,
RSHIFT = 54,
LCONTROL = 29,
RCONTROL = 29,
LMENU = 56,
RMENU = 56,
BROWSER_BACK = 106,
BROWSER_FORWARD = 105,
BROWSER_REFRESH = 103,
BROWSER_STOP = 104,
BROWSER_SEARCH = 101,
BROWSER_FAVORITES = 102,
BROWSER_HOME = 50,
VOLUME_MUTE = 32,
VOLUME_DOWN = 46,
VOLUME_UP = 48,
MEDIA_NEXT_TRACK = 25,
MEDIA_PREV_TRACK = 16,
MEDIA_STOP = 36,
MEDIA_PLAY_PAUSE = 34,
LAUNCH_MAIL = 108,
LAUNCH_MEDIA_SELECT = 109,
LAUNCH_APP1 = 107,
LAUNCH_APP2 = 33,
OEM_1 = 39,
OEM_PLUS = 13,
OEM_COMMA = 51,
OEM_MINUS = 12,
OEM_PERIOD = 52,
OEM_2 = 53,
OEM_3 = 41,
OEM_4 = 26,
OEM_5 = 43,
OEM_6 = 27,
OEM_7 = 40,
OEM_8 = 0,
OEM_102 = 86,
PROCESSKEY = 0,
PACKET = 0,
ATTN = 0,
CRSEL = 0,
EXSEL = 0,
EREOF = 93,
PLAY = 0,
ZOOM = 98,
NONAME = 0,
PA1 = 0,
OEM_CLEAR = 0
}
}

@ -24,6 +24,8 @@ namespace SCJMapper_V2.Devices.Keyboard
public new const string DeviceClass = "keyboard"; // the device name used throughout this app
public new const string DeviceID = "kb1_";
static public int RegisteredDevices = 0; // devices add here once they are created (though will not decrement as they are not deleted)
public const string DevNameCIG = "Keyboard"; // just a name...
public const string DevGUIDCIG = "{00000000-0000-0000-0000-000000000000}"; // - Fixed for Keyboards, we dont differentiate
public const string ClearMods = "escape";
@ -123,7 +125,7 @@ namespace SCJMapper_V2.Devices.Keyboard
/// </summary>
/// <param name="pressedKeys">The list of pressed DX keys</param>
/// <returns>The SC keycode string</returns>
public static string DXKeyboardCmd( List<Key> pressedKeys, bool modAndKey, bool keyOnly )
public static string FromDXKeyboardCmd( List<Key> pressedKeys, bool modAndKey, bool keyOnly )
{
string altMod = "";
string shiftMod = "";
@ -256,6 +258,120 @@ namespace SCJMapper_V2.Devices.Keyboard
}
/// <summary>
/// Converts from SC command to DX command
/// </summary>
/// <param name="scKey">A single SC game keyname</param>
/// <returns>The DX Code of this key</returns>
static public Key FromSCKeyboardCmd( string scKey )
{
switch ( scKey ) {
// handle modifiers first
case "lalt": return Key.LeftAlt;
case "ralt": return Key.RightAlt;
case "lshift": return Key.LeftShift;
case "rshift": return Key.RightShift;
case "lctrl":return Key.LeftControl;
case "rctrl": return Key.RightControl;
// function keys first
case "f1": return Key.F1;
case "f2": return Key.F2;
case "f3": return Key.F3;
case "f4": return Key.F4;
case "f5": return Key.F5;
case "f6": return Key.F6;
case "f7": return Key.F7;
case "f8": return Key.F8;
case "f9": return Key.F9;
case "f10": return Key.F10;
case "f11": return Key.F11;
case "f12": return Key.F12;
case "f13": return Key.F13;
case "f14": return Key.F14;
case "f15": return Key.F15;
// all keys where the DX name does not match the SC name
// Numpad
case "numlock": return Key.NumberLock;
case "np_divide": return Key.Divide;
case "np_multiply": return Key.Multiply;
case "np_subtract": return Key.Subtract;
case "np_add": return Key.Add;
case "np_period": return Key.Decimal;
case "np_enter": return Key.NumberPadEnter;
case "np_0": return Key.NumberPad0;
case "np_1": return Key.NumberPad1;
case "np_2": return Key.NumberPad2;
case "np_3": return Key.NumberPad3;
case "np_4": return Key.NumberPad4;
case "np_5": return Key.NumberPad5;
case "np_6": return Key.NumberPad6;
case "np_7": return Key.NumberPad7;
case "np_8": return Key.NumberPad8;
case "np_9": return Key.NumberPad9;
// Digits
case "0": return Key.D0;
case "1": return Key.D1;
case "2": return Key.D2;
case "3": return Key.D3;
case "4": return Key.D4;
case "5": return Key.D5;
case "6": return Key.D6;
case "7": return Key.D7;
case "8": return Key.D8;
case "9": return Key.D9;
// navigation
case "insert": return Key.Insert;
case "home": return Key.Home;
case "delete": return Key.Delete;
case "end": return Key.End;
case "pgup": return Key.PageUp;
case "pgdown": return Key.PageDown;
case "print": return Key.PrintScreen;
case "scrolllock": return Key.ScrollLock;
case "pause": return Key.Pause;
// Arrows
case "up": return Key.Up;
case "down": return Key.Down;
case "left": return Key.Left;
case "right": return Key.Right;
// non letters
case "escape": return Key.Escape;
case "minus": return Key.Minus;
case "equals": return Key.Equals;
case "grave": return Key.Grave;
case "underline": return Key.Underline;
case "backspace": return Key.Back;
case "tab": return Key.Tab;
case "lbracket": return Key.LeftBracket;
case "rbracket": return Key.RightBracket;
case "enter": return Key.Return;
case "capslock": return Key.Capital;
case "colon": return Key.Colon;
case "backslash": return Key.Backslash;
case "comma": return Key.Comma;
case "period": return Key.Period;
case "slash": return Key.Slash;
case "space": return Key.Space;
case "semicolon": return Key.Semicolon;
case "apostrophe": return Key.Apostrophe;
// all where the lowercase DX name matches the SC name
default:
if ( string.IsNullOrEmpty( scKey ) ) return Key.Unknown;
string letter = scKey.ToUpperInvariant( );
if (Enum.TryParse( letter, out Key dxKey ) ) {
return dxKey;
}
else {
return Key.Unknown;
}
}
}
/// <summary>
/// Format the various parts to a valid ctrl entry
/// </summary>
@ -296,7 +412,8 @@ namespace SCJMapper_V2.Devices.Keyboard
/// <summary>
/// The ProductGUID property
/// </summary>
public override string DevGUID { get { return "{" + m_device.Information.ProductGuid.ToString( ).ToUpperInvariant( ) + "}"; } }
//public override string DevGUID { get { return "{" + m_device.Information.ProductGuid.ToString( ).ToUpperInvariant( ) + "}"; } }
public override string DevGUID { get { return DevGUIDCIG; } } // generic as we don't differentiate Kbds
/// <summary>
/// The JS Instance GUID for multiple device support (VJoy gets 2 of the same name)
@ -369,7 +486,7 @@ namespace SCJMapper_V2.Devices.Keyboard
/// <returns>An input string or an empty string if no input is available</returns>
public override string GetCurrentInput()
{
return DXKeyboardCmd( m_state.PressedKeys, true, true );
return FromDXKeyboardCmd( m_state.PressedKeys, true, true );
}
/// <summary>
@ -378,7 +495,7 @@ namespace SCJMapper_V2.Devices.Keyboard
/// <returns>The last action as with modifiers</returns>
public override string GetLastChange( )
{
return DXKeyboardCmd( m_state.PressedKeys, true, false );
return FromDXKeyboardCmd( m_state.PressedKeys, true, false );
}
@ -389,7 +506,7 @@ namespace SCJMapper_V2.Devices.Keyboard
/// <returns>Last action mod and key or only modifier</returns>
public string GetLastChange( bool modAndKey )
{
return DXKeyboardCmd( m_state.PressedKeys, modAndKey, false);
return FromDXKeyboardCmd( m_state.PressedKeys, modAndKey, false);
}

@ -26,6 +26,8 @@ namespace SCJMapper_V2.Devices.Mouse
public new const string DeviceClass = "mouse"; // the device name used throughout this app
public new const string DeviceID = "mo1_";
static public int RegisteredDevices = 0; // devices add here once they are created (though will not decrement as they are not deleted)
public const string DevNameCIG = "Mouse"; // just a name...
public const string DevGUIDCIG = "{10001000-0000-0000-0000-000000000000}"; // - Fixed for Mouse, we dont differentiate
public new const string DisabledInput = DeviceID + DeviceCls.DisabledInput;
static public new bool IsDisabledInput( string input )

@ -46,7 +46,7 @@ namespace SCJMapper_V2.Layout
/// <summary>
/// Returns the Modifier for this item
/// i.e.
/// i.e. only modifiers
/// </summary>
public string Modifier
{
@ -59,7 +59,22 @@ namespace SCJMapper_V2.Layout
for ( int i = 0; i < e.Length - 1; i++ ) {
mod += MapProps.ModS( e[i] );
}
return "("+mod+")";
return "(" + mod + ")";
}
}
/// <summary>
/// Returns the Main Control for this item
/// i.e. no modifiers
/// </summary>
public string MainControl
{
get {
// input can be: {modifier+}Input
if ( !ControlInput.Contains( "+" ) ) return ControlInput; // no modifier
string[] e = ControlInput.Split( new char[] { '+' } );
return e[e.Length - 1]; // last item
}
}

@ -4,6 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SCJMapper_V2.Devices.Gamepad;
using SCJMapper_V2.Devices.Keyboard;
namespace SCJMapper_V2.Layout
{
@ -92,131 +93,187 @@ namespace SCJMapper_V2.Layout
return ail;
}
private List<ActionItem> AI_Gamepad( string aMap )
private List<ActionItem> AI_Gamepad( string aMap, string guid )
{
var ail = new List<ActionItem>( );
var ai = new ActionItem {
ActionMap = aMap, ControlInput = "x", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - Button X", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - Button X", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "a", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - Button A", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - Button A", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "b", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - Button B", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - Button B", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "y", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - Button Y", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - Button Y", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "shoulderl", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - Button Shoulder Left", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - Button Shoulder Left", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "shoulderr", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - Button Shoulder Right", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - Button Shoulder Right", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "triggerl_btn", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - Button Trigger Left", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - Button Trigger Left", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "triggerr_btn", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - Button Trigger Right", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - Button Trigger Right", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "back", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - Button Back", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - Button Back", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "start", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - Button Start", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - Button Start", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "thumbl", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - Button Thumb Left", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - Button Thumb Left", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "thumbr", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - Button Thumb Right", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - Button Thumb Right", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "dpad_up", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - POV Up", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - POV Up", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "dpad_right", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - POV Right", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - POV Right", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "dpad_down", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - POV Down", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - POV Down", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "dpad_left", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - POV Left", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - POV Left", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "thumblx", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - X - Axis Thumb Left", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - X - Axis Thumb Left", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "thumbly", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - Y - Axis Thumb Left", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - Y - Axis Thumb Left", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "thumbrx", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - X - Axis Thumb Right", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - X - Axis Thumb Right", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "thumbry", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - Y - Axis Thumb Right", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - Y - Axis Thumb Right", InputType = $"G1"
}; ail.Add( ai );
return ail;
}
private List<ActionItem> AI_GamepadMods( string aMap )
private List<ActionItem> AI_GamepadMods( string aMap, string guid )
{
var ail = new List<ActionItem>( );
var ai = new ActionItem {
ActionMap = aMap, ControlInput = "shoulderl+x", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - ShLeft + Button X", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - ShLeft + Button X", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "shoulderl+a", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - ShLeft + Button A", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - ShLeft + Button A", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "shoulderl+b", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - ShLeft + Button B", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - ShLeft + Button B", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "shoulderl+y", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - ShLeft + Button Y", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - ShLeft + Button Y", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "shoulderl+triggerl_btn", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - ShLeft + Trigger Left", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - ShLeft + Trigger Left", InputType = $"G1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "shoulderl+triggerr_btn", DeviceName = "Debug Controller",
DeviceProdGuid = GamepadCls.DevGUIDCIG, DispText = $"GP - ShLeft + Trigger Right", InputType = $"G1"
DeviceProdGuid = guid, DispText = $"GP - ShLeft + Trigger Right", InputType = $"G1"
}; ail.Add( ai );
return ail;
}
private List<ActionItem> AI_Keyboard( string aMap, string guid )
{
var ail = new List<ActionItem>( );
var ai = new ActionItem {
ActionMap = aMap, ControlInput = "a", DeviceName = "Debug Controller",
DeviceProdGuid = guid, DispText = $"KB - Key A", InputType = $"K1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "q", DeviceName = "Debug Controller",
DeviceProdGuid = guid, DispText = $"KB - Key Q", InputType = $"K1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "x", DeviceName = "Debug Controller",
DeviceProdGuid = guid, DispText = $"KB - Key A", InputType = $"K1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "y", DeviceName = "Debug Controller",
DeviceProdGuid = guid, DispText = $"KB - Key Y", InputType = $"K1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "z", DeviceName = "Debug Controller",
DeviceProdGuid = guid, DispText = $"KB - Key Z", InputType = $"K1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "1", DeviceName = "Debug Controller",
DeviceProdGuid = guid, DispText = $"KB - Key 1", InputType = $"K1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "0", DeviceName = "Debug Controller",
DeviceProdGuid = guid, DispText = $"KB - Key 0", InputType = $"K1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "f1", DeviceName = "Debug Controller",
DeviceProdGuid = guid, DispText = $"KB - Key F1", InputType = $"K1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "np_0", DeviceName = "Debug Controller",
DeviceProdGuid = guid, DispText = $"KB - Key Numpad 0", InputType = $"K1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "np_multiply", DeviceName = "Debug Controller",
DeviceProdGuid = guid, DispText = $"KB - Key Numpad *", InputType = $"K1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "backspace", DeviceName = "Debug Controller",
DeviceProdGuid = guid, DispText = $"KB - Key Backspace", InputType = $"K1"
}; ail.Add( ai );
ai = new ActionItem {
ActionMap = aMap, ControlInput = "escape", DeviceName = "Debug Controller",
DeviceProdGuid = guid, DispText = $"KB - Key Escape", InputType = $"K1"
}; ail.Add( ai );
return ail;
}
/// <summary>
@ -241,13 +298,17 @@ namespace SCJMapper_V2.Layout
// Create Gamepad
// Gamepads are in "spaceship_targeting"
m_actionItems.AddRange( AI_Gamepad( "spaceship_targeting" ) );
// m_actionItems.AddRange( AI_Gamepad( "spaceship_targeting", GamepadCls.DevGUIDCIG ) );
// Create Gamepad modified
// Gamepads Mods are in "spaceship_target_hailing"
m_actionItems.AddRange( AI_GamepadMods( "spaceship_target_hailing" ) );
// m_actionItems.AddRange( AI_GamepadMods( "spaceship_target_hailing", GamepadCls.DevGUIDCIG ) );
// Create Keyboard
// Keyboard are in "vehicle_general"
m_actionItems.AddRange( AI_Keyboard( "vehicle_general", KeyboardCls.DevGUIDCIG ) );
// Create Keyboard modified
}

@ -17,6 +17,7 @@ namespace SCJMapper_V2.Layout
"InputDevices" :[
{
"InputType": "J1",
"FontFamily": "Tahoma",
"DeviceName": "T16000M",
"DeviceProdGuid": ["{B10A044F-0000-0000-0000-504944564944}"],
"Controls": [
@ -56,7 +57,7 @@ namespace SCJMapper_V2.Layout
/// Find a Control entry with the given product guid and input command
/// </summary>
/// <param name="pidVid">the Device Prduct PID VID string in lowecase</param>
/// <param name="input">the Item (device property)</param>
/// <param name="input">the Main input command without modifiers</param>
/// <param name="firstInstance">If true it looks for the InputTypeNumber 1 (InputType="x1") else for the next</param>
/// <returns>The found Control or Null</returns>
public Control FindItem( string pidVid, string input, bool firstInstance )
@ -66,15 +67,13 @@ namespace SCJMapper_V2.Layout
for ( int i = 0; i < InputDevices.Count; i++ ) {
if ( InputDevices[i].DevicePIDVID.Contains( pidVid ) ) { // can have multiple PID VIDs for a device (alternates)
// input can be: {modifier+}Input
string[] e = input.Split( new char[] { '+' } );
string effInput = e[e.Length - 1]; // last item is the real input
// returns if we are asked for the first instance and it is the first one (default)
if ( firstInstance && ( InputDevices[i].InputTypeNumber == 1 ) ) {
return InputDevices[i].FindItem( effInput );
// Use numbers only when there are more than one device with the same GUID in a file !!! (or 0)
if ( firstInstance && ( InputDevices[i].InputTypeNumber <= 1 ) ) {
return InputDevices[i].FindItem( input );
}
else if ( !firstInstance && InputDevices[i].InputTypeNumber > 1 ) {
return InputDevices[i].FindItem( effInput ); // not first and J2.. - return any other (more than 2 not supported)
else if ( !firstInstance && ( InputDevices[i].InputTypeNumber > 1 || InputDevices[i].InputTypeNumber == 0 ) ) {
return InputDevices[i].FindItem( input ); // not first and dev2+ or dev0.. - return any other (more than 2 not supported)
}
}
}
@ -103,7 +102,9 @@ namespace SCJMapper_V2.Layout
class Device
{
[DataMember( IsRequired = true )]
public string InputType { get; set; } // Joystick, Throttle, Pedal, Gamepad, Keyboard, Other
public string InputType { get; set; } // J[n], G[n], K[n], M[n], X
[DataMember( IsRequired = false )]
public string FontFamily { get; set; } // any valid FontFamily
[DataMember( IsRequired = true )]
public string DeviceName { get; set; } // The device name
[DataMember( IsRequired = true )]
@ -113,6 +114,21 @@ namespace SCJMapper_V2.Layout
// non Json
private Font m_deviceFont = null;
/// <summary>
/// Get the base font for this device
/// </summary>
public Font DeviceFont
{
get {
if ( !string.IsNullOrEmpty( FontFamily ) ) {
return m_deviceFont;
}
return MapProps.MapFont; // no specified - get the default one
}
}
/// <summary>
/// Describes a known device
/// Used for the Layout Debug Mode
@ -144,7 +160,7 @@ namespace SCJMapper_V2.Layout
return num;
}
}
return 1; //default
return 0; //default
}
}
@ -163,18 +179,31 @@ namespace SCJMapper_V2.Layout
}
}
// this one tracks the returned KbdItems - must be reset when Shapes are newly created
private int m_kbdItemTracker = 0;
/// <summary>
/// Find a Control entry with the given input command
/// For Keyboards there is not an entry for every possible key - so return just the next one
/// </summary>
/// <param name="input">the Item (device property)</param>
/// <returns>The found Control or Null</returns>
public Control FindItem( string input )
{
// we may find it already here
for ( int i = 0; i < Controls.Count; i++ ) {
if ( input == Controls[i].Input ) {
return Controls[i];
}
}
// if not - and Keyboard - assign a new one and tag it
if ( this.InputTypeLetter == "X" ) {
if ( Controls.Count > m_kbdItemTracker ) {
int item = m_kbdItemTracker++;
Controls[item].Input = input; // mark to reuse
return Controls[item];
}
}
return null;
}
@ -184,8 +213,13 @@ namespace SCJMapper_V2.Layout
/// </summary>
public void CreateShapes()
{
m_kbdItemTracker = 0; // reset
if ( m_deviceFont != null ) m_deviceFont.Dispose( );
if ( !string.IsNullOrEmpty( FontFamily ) ) {
m_deviceFont = new Font( FontFamily, MapProps.FontSize ); // create actual Font here
}
for ( int i = 0; i < Controls.Count; i++ ) {
Controls[i].CreateShapes( );
Controls[i].CreateShapes( DeviceFont, this.InputTypeLetter == "X" ); // symbols only for X type maps (keyboard with Symbols)
}
}
@ -228,28 +262,52 @@ namespace SCJMapper_V2.Layout
/// <summary>
/// Create all possible ShapeItems for this Control
/// </summary>
public void CreateShapes()
public void CreateShapes( Font deviceFontRef, bool useSymbol )
{
// this is a bit messy...
// have to allocate a number of Rectangles to draw into but the layout rects are very different in size..
this.ShapeItems = new Queue<ShapeItem>( ); // get rid of previous ones
// create a reference font
int baseHeight = MapProps.MapFont.Height;
int baseWidth = MapProps.MapFont.Height * 12; // Lets see if this is good or needs adjustment
int baseWidth = MapProps.MapFont.Height * 12; // Lets see if this is a good Width or needs adjustment
// live values from base
int nCols = Width / baseWidth;
if ( nCols == 0 ) {
nCols = 1; // at least one column..
}
baseWidth = (int)Math.Floor( (double)Width / nCols ); // fill rectangle
int nLines = Height / baseHeight;
if ( nLines == 0 ) {
nLines = 1; // at least one line..
}
baseHeight = (int)Math.Floor( (double)Height / nLines ); // fill rectangle
bool symbol = useSymbol;
for ( int l = 0; l < nLines; l++ ) {
for ( int c = 0; c < nCols; c++ ) {
var sh = new ShapeItem {
X = X + c * baseWidth,
Y = Y + l * baseHeight + 2, // offset Y by 2 pix to have it more centered
Width = baseWidth,
Height = baseHeight
};
ShapeItems.Enqueue( sh );
if ( this.Type == "Key" ) {
var sh = new ShapeKey {
X = X + c * baseWidth,
Y = Y + l * baseHeight,
Width = baseWidth,
Height = baseHeight,
IsSymbolShape = symbol,
TextFontRef = deviceFontRef
};
symbol = false; // only once
ShapeItems.Enqueue( sh );
}
else {
var sh = new ShapeItem {
X = X + c * baseWidth,
Y = Y + l * baseHeight,
Width = baseWidth,
Height = baseHeight,
TextFontRef = deviceFontRef
};
ShapeItems.Enqueue( sh );
}
}
}
}

@ -214,23 +214,27 @@ namespace SCJMapper_V2.Layout
// for all actions found from action tree
m_displayList.Clear( );
( cbxLayouts.SelectedItem as DeviceLayout ).DeviceController.CreateShapes( );
foreach ( var si in ActionList ) {
foreach ( var actItem in ActionList ) {
// matches the selected device
if ( MatchCriteria( si ) ) {
bool firstInstance = ActionList.IsFirstInstance( si.DevicePidVid, si.InputTypeNumber );
var ctrl = ( cbxLayouts.SelectedItem as DeviceLayout ).DeviceController.FindItem( si.DevicePidVid, si.ControlInput, firstInstance );
if ( MatchCriteria( actItem ) ) {
bool firstInstance = ActionList.IsFirstInstance( actItem.DevicePidVid, actItem.InputTypeNumber );
var ctrl = ( cbxLayouts.SelectedItem as DeviceLayout ).DeviceController.FindItem( actItem.DevicePidVid, actItem.MainControl, firstInstance );
if ( ctrl != null ) {
if ( ctrl.ShapeItems.Count > 0 ) {
var shape = ctrl.ShapeItems.Dequeue( );
shape.DispText = si.ModdedDispText;
shape.TextColor = MapProps.MapForeColor( si.ActionMap );
shape.BackColor = MapProps.MapBackColor( si.ActionMap );
shape.DispText = actItem.ModdedDispText;
shape.TextColor = MapProps.MapForeColor( actItem.ActionMap );
shape.BackColor = MapProps.MapBackColor( actItem.ActionMap );
if ( shape is ShapeKey ) {
// kbd map
( shape as ShapeKey ).SCGameKey = actItem.MainControl;
}
m_displayList.Add( shape );
}
else {
// Display elements exhausted...
if ( ! errorShown ) {
string msg = $"No more display elements left for device: {si.DeviceName}";
string msg = $"No more display elements left for device: {actItem.DeviceName}";
msg += $"\n\nTry to use a smaller font to show all actions!";
MessageBox.Show( msg, "Layout - Cannot show all actions", MessageBoxButtons.OK, MessageBoxIcon.Warning );
errorShown = true; // only once

@ -16,13 +16,15 @@ namespace SCJMapper_V2.Layout
{
public static string ModShoulderLeft = "←";//═
public static string ModShoulderRight = "→";
public static string ModDpadDown = "↓";
public static string ModTrigLeft = "◄";
public static string ModAltLeft = "←Å";
public static string ModAltRight = "→Å";
public static string ModCtrlLeft = "←Ꞓ";
public static string ModCtrlRight = "→Ꞓ";
public static string ModShiftLeft = "←Ȿ";
public static string ModShiftRight = "→Ȿ";
public static string ModAltLeft = "<A";
public static string ModAltRight = "<A";
public static string ModCtrlLeft = "<C";
public static string ModCtrlRight = ">C";
public static string ModShiftLeft = "<S";
public static string ModShiftRight = ">S";
/// <summary>
/// Returns a Layout Modifier string (char) for a given modifier
@ -55,6 +57,13 @@ namespace SCJMapper_V2.Layout
else if ( modifier == "rctrl" ) {
return ModCtrlRight;
}
else if ( modifier == "dpad_down" ) {
return ModDpadDown;
}
else if ( modifier == "triggerl_btn" ) {
return ModTrigLeft;
}
else {
return "⸮";
}
@ -75,8 +84,22 @@ namespace SCJMapper_V2.Layout
}
}
// Text
private const string c_fontFamily = "Tahoma";
private static int m_fontSize = 16; // maintained as int to support the TrackBar Value property)
private static Font m_font = new Font( "Tahoma", m_fontSize ); // real fontsize will be scaled to float but not used outside
private static Font m_font = new Font( c_fontFamily, m_fontSize ); // real fontsize will be scaled to float but not used outside
// Keyboard Layout Text
private const string c_kbdFontFamily = "Gill Sans Nova Cond";
private static Font m_kbdFont = new Font( c_kbdFontFamily, m_fontSize ); // real fontsize will be scaled to float but not used outside
// Keyboard Symbols
private const string c_kbdSymbolFontFamily = "Tahoma";
private const int c_kbdSymbolFontDecrement = 5; // kbd Symbol is so many points smaller than main font
private static Font m_kbdSymbolFont = new Font( c_kbdSymbolFontFamily, m_fontSize - c_kbdSymbolFontDecrement );
private static Brush m_kbdSymbolBrush = Brushes.DimGray;
private static Pen m_kbdSymbolPen = Pens.Gray;
// all known actionmaps with it's classification
private static Dictionary<EGroup, ColorPair> m_amColors;
@ -170,7 +193,7 @@ namespace SCJMapper_V2.Layout
/// <summary>
/// FontSize property
/// creates a new MapFont property to use
/// creates a new MapFont and KbdSymbolFont property to use
/// </summary>
public static int FontSize
{
@ -178,8 +201,10 @@ namespace SCJMapper_V2.Layout
set {
m_fontSize = value;
m_font = new Font( m_font.FontFamily, m_fontSize );
}
}
m_kbdSymbolFont = new Font( m_kbdSymbolFont.FontFamily, m_fontSize - c_kbdSymbolFontDecrement );
}
}
// Handle Layout Colors
@ -246,5 +271,14 @@ namespace SCJMapper_V2.Layout
return m_amColors[eGroup].BackColor;
}
// Keyboard Text
public static Font KbdFont { get => m_kbdFont; }
// Keyboard Symbols
public static Font KbdSymbolFont { get => m_kbdSymbolFont; }
public static Brush KbdSymbolBrush { get => m_kbdSymbolBrush; }
public static Pen KbdSymbolPen { get => m_kbdSymbolPen; }
}
}

@ -55,11 +55,13 @@ namespace SCJMapper_V2.Layout
public bool IsValid { get => !string.IsNullOrEmpty( DispText ); }
private Brush m_textBrush = Brushes.Black;
private Color m_textColor = Color.DarkBlue;
protected Brush m_textBrush = Brushes.Black;
protected Color m_textColor = Color.DarkBlue;
private Brush m_backBrush = Brushes.White;
private Color m_backColor = Color.White;
protected Brush m_backBrush = Brushes.White;
protected Color m_backColor = Color.White;
protected Font m_textFontRef = null;
/// <summary>
/// Set the Textcolor
@ -87,6 +89,13 @@ namespace SCJMapper_V2.Layout
}
}
/// <summary>
/// TextFont Property of this shape
/// you get a ref not a new font here
/// </summary>
public Font TextFontRef { get => m_textFontRef; set => m_textFontRef = value; }
/// <summary>
/// Returns the drawn text size for this item
/// </summary>
@ -102,13 +111,13 @@ namespace SCJMapper_V2.Layout
/// <summary>
/// Draws the shape
/// </summary>
public void DrawShape( Graphics g )
public virtual void DrawShape( Graphics g )
{
if ( IsValid ) {
if ( m_backColor!= Color.White ) {
g.FillRectangle( m_backBrush, Rectangle );
}
g.DrawString( DispText, MapProps.MapFont, m_textBrush, Rectangle ); // write into the rectangle
g.DrawString( DispText, TextFontRef, m_textBrush, Rectangle ); // write into the rectangle
}
}

@ -0,0 +1,170 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SCJMapper_V2.Common;
using SCJMapper_V2.Devices.Keyboard;
namespace SCJMapper_V2.Layout
{
/// <summary>
/// Key Input
/// contains a text to display at a position within a rectangle
/// </summary>
class ShapeKey : ShapeItem
{
/// <summary>
/// The SCGameKey for this Command
/// Only a single one - NO modifiers here
/// </summary>
public string SCGameKey { get; set; }
/// <summary>
/// The DX GameKey for this Command
/// </summary>
public SharpDX.DirectInput.Key DXGameKey
{
get {
return KeyboardCls.FromSCKeyboardCmd( SCGameKey );
}
}
/// <summary>
/// The Windows Virtual GameKey for this Command
/// </summary>
public VirtualKey WinVirtualKey
{
get {
return (VirtualKey)WinApi.MapVirtualKeyEx( (uint)DXGameKey, WinApi.VirtualKeyMapType.MAPVK_VSC_TO_VK_EX, IntPtr.Zero );
}
}
/// <summary>
/// Indicates that the Key symbol needs to be drawn
/// </summary>
public bool IsSymbolShape { get; set; } = false; // default
/// <summary>
/// GetRoundRectPath
/// Credit: licensed under The Code Project Open License (CPOL)
/// https://www.codeproject.com/Articles/27228/A-class-for-creating-round-rectangles-in-GDI-with
/// This function uses the AddArc method for defining the rounded rectangle path.
/// The first workaround handles the special case where the radius is 10.
/// It offsets the arc's rectangle and increases its size at a strategic point.
/// I dont have a good theory for why this works or why it is only needed for a radius of 10.
/// </summary>
private void GetRoundRectPath( ref GraphicsPath pPath, Rectangle r, int dia )
{
// diameter can't exceed width or height
if ( dia > r.Width ) dia = r.Width;
if ( dia > r.Height ) dia = r.Height;
// define a corner
var Corner = new Rectangle( r.X, r.Y, dia, dia );
pPath.Reset( ); // begin path
// top left
pPath.AddArc( Corner, 180, 90 );
// tweak needed for radius of 10 (dia of 20)
if ( dia == 20 ) {
Corner.Width += 1;
Corner.Height += 1;
r.Width -= 1; r.Height -= 1;
}
// top right
Corner.X += ( r.Width - dia - 1 );
pPath.AddArc( Corner, 270, 90 );
// bottom right
Corner.Y += ( r.Height - dia - 1 );
pPath.AddArc( Corner, 0, 90 );
// bottom left
Corner.X -= ( r.Width - dia - 1 );
pPath.AddArc( Corner, 90, 90 );
// end path
pPath.CloseFigure( );
}
/// <summary>
/// DrawRoundRect
/// Credit: licensed under The Code Project Open License (CPOL)
/// https://www.codeproject.com/Articles/27228/A-class-for-creating-round-rectangles-in-GDI-with
/// This function draws a rounded rectangle using the passed rectangle, radius, pen color, and pen width.
/// The second workaround involves using a pen width of 1 and drawing “width” number of rectangles,
/// decrementing the size of the rect each time.That alone is insufficient, because it will leave
/// holes at the corners. Instead, this deflates only the x, draws the rect, then deflates the y, and draws again.
/// </summary>
private void DrawRoundRect( Graphics pGraphics, Rectangle r, Color color, int radius, int width )
{
int dia = 2 * radius;
// set to pixel mode
var oldPageUnit = pGraphics.PageUnit;
pGraphics.PageUnit = GraphicsUnit.Pixel;
// define the pen
var pen = new Pen( color, 1 );
pen.Alignment = System.Drawing.Drawing2D.PenAlignment.Center;
// get the corner path
var path = new GraphicsPath( );
// get path
GetRoundRectPath( ref path, r, dia );
// draw the round rect
pGraphics.DrawPath( pen, path );
// if width > 1
for ( int i = 1; i < width; i++ ) {
r.Inflate( -1, 0 ); // left stroke
GetRoundRectPath( ref path, r, dia ); // get the path
pGraphics.DrawPath( pen, path ); // draw the round rect
r.Inflate( 0, -1 ); // up stroke
GetRoundRectPath( ref path, r, dia ); // get the path
pGraphics.DrawPath( pen, path ); // draw the round rect
}
// restore page unit
pGraphics.PageUnit = oldPageUnit;
}
/// <summary>
/// Draw a key
/// </summary>
/// <param name="g"></param>
/// <param name="location"></param>
/// <param name="key"></param>
private void DrawKey( Graphics g, Rectangle drawRect, string key )
{
var printSize =Size.Add( Size.Ceiling( g.MeasureString( key, MapProps.MapFont ) ), new Size(18,18)); // get the surounding box for the Text
var rect = new Rectangle( drawRect.Location, printSize );
rect.Offset( 0, ( drawRect.Height - printSize.Height ) / 2 ); // try to find the middle by shifting the drawing
if ( rect.Width < rect.Height ) rect.Width = rect.Height; // minimum with
DrawRoundRect( g, rect, MapProps.KbdSymbolPen.Color, 7, 3 );
rect.Inflate( -5, -5 );
DrawRoundRect( g, rect, MapProps.KbdSymbolPen.Color, 7, 3 );
rect.Inflate( -2, -2 );
g.DrawString( key, MapProps.MapFont, MapProps.KbdSymbolBrush, rect ); // write into the rectangle
}
#region IShape Implementation
/// <summary>
/// Draws the shape
/// </summary>
public override void DrawShape( Graphics g )
{
// Key Symbol left of the Text Location
if ( IsValid ) {
var symbolRect = Rectangle;
symbolRect.Offset( -120, 0 ); // TODO get a proper left offset rather than static (Should be left aligned though..)
symbolRect.Width = 120;
string key = WinApi.KbdScanCodeToVK((uint)DXGameKey); // might work....
if (IsSymbolShape) DrawKey( g, symbolRect, key );
}
// draw the text
base.DrawShape( g );
}
#endregion
}
}

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion( "2.45.0.80" )]
[assembly: AssemblyFileVersion( "2.45.0.80" )]
[assembly: AssemblyVersion( "2.46.0.81" )]
[assembly: AssemblyFileVersion( "2.46.0.81" )]

@ -1,10 +1,10 @@
SC Joystick Mapper V 2.45 - Build 80 BETA
(c) Cassini, StandardToaster - 09-Mar-2020
SC Joystick Mapper V 2.46 - Build 81 BETA
(c) Cassini, StandardToaster - 16-Mar-2020
Contains 14 files + graphics:
SCJMapper.exe The program (V2.45)
SCJMapper.exe.config Program config (V2.45) - MUST be in the same folder as the Exe file
SCJMapper.exe The program (V2.46)
SCJMapper.exe.config Program config (V2.46) - MUST be in the same folder as the Exe file
de\SCJMapper.resources.dll German language (V2.45) - MUST be in the same folder as the Exe file
fr\SCJMapper.resources.dll French language (V2.45) - MUST be in the same folder as the Exe file
Storage\*.scj Folder for collected assets (V2.35) - MUST be in the same folder as the Exe file
@ -23,7 +23,7 @@ SCJMapper_QGuide V2.35beta.pdf Quick Guide (v2.35)
ReadMe.txt This file
graphics folder Skybox Images (V2.32) - graphics folder MUST be in the same folder as the Exe file
graphics\layouts folder Layout Images & defs (V2.45) - layouts folder MUST be in the graphics folder above
graphics\layouts folder Layout Images & defs (V2.46) - layouts folder MUST be in the graphics folder above
NOTE V 2.41+:
search order for defaultProfile.xml to build the action tree is:
@ -47,6 +47,10 @@ Scanned for viruses before packing...
cassini@burri-web.org
Changelog:
V 2.46 - BETA Build 81
- add Some more Layout files for devices
- update Layout to work with keyboard and mouse
- fix for some Layout files and general fixes in the layout part
V 2.45 - BETA Build 80
- add Some more Layout files for devices
- update Layout to work with dual Joysticks of the same type and Gamepads

@ -27,8 +27,8 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>80</ApplicationRevision>
<ApplicationVersion>2.45.0.80</ApplicationVersion>
<ApplicationRevision>81</ApplicationRevision>
<ApplicationVersion>2.46.0.81</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
@ -140,6 +140,8 @@
<Compile Include="AppSettings.cs" />
<Compile Include="Common\CloneableItems.cs" />
<Compile Include="Common\Commons.cs" />
<Compile Include="Common\WinApi.cs" />
<Compile Include="Common\WinApi_InputConst.cs" />
<Compile Include="Devices\DeviceCls.cs" />
<Compile Include="Devices\Monitor\DeviceMonitoring.cs" />
<Compile Include="Devices\DeviceInst.cs" />
@ -198,6 +200,7 @@
<Compile Include="Layout\Layouts.cs" />
<Compile Include="Layout\ShapeItem.cs" />
<Compile Include="Layout\ShapeItemList.cs" />
<Compile Include="Layout\ShapeKey.cs" />
<Compile Include="RTF\RTFformatter.cs" />
<Compile Include="SC\Modifiers.cs" />
<Compile Include="SC\p4kFile\p4kDirectory.cs" />
@ -351,6 +354,7 @@
</EmbeddedResource>
<EmbeddedResource Include="Layout\FormLayout.resx">
<DependentUpon>FormLayout.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Translation\Strings.de.resx">
<Generator>PublicResXFileCodeGenerator</Generator>

@ -1332,12 +1332,12 @@ namespace SCJMapper_V2.Actions
case Act.ActionDevice.AD_Keyboard:
sItem.InputType = "K1";
sItem.DeviceName = KeyboardCls.DeviceClass;
sItem.DeviceProdGuid = ""; // not needed - generic
sItem.DeviceProdGuid = KeyboardCls.DevGUIDCIG;
break;
case Act.ActionDevice.AD_Mouse:
sItem.InputType = "M1";
sItem.DeviceName = MouseCls.DeviceClass;
sItem.DeviceProdGuid = ""; // not needed - generic
sItem.DeviceProdGuid = MouseCls.DevGUIDCIG;
break;
case Act.ActionDevice.AD_Joystick:
int jsNum = JoystickCls.JSNum( acc.DevInput ) - 1;

Binary file not shown.

@ -1,5 +1,5 @@
{
"MapName" : "CH Combat Stick + Throttle",
"MapName" : "1: CH Combat Joystick & Throttle",
"MapImage" : "chcombat.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "CH Fighter Stick + Throttle",
"MapName" : "1: CH Fighter Joytick & Throttle",
"MapImage" : "chfighter.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "CH Pro Flight Throttle Quadrant",
"MapName" : "5: CH Pro Flight Throttle Quadrant",
"MapImage" : "chproflightquadrant.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "Defender Cobra M5",
"MapName" : "1: Defender Cobra M5 Joystick",
"MapImage" : "cobram5.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "Logitech Extreme 3DPro",
"MapName" : "2: Logitech Extreme 3DPro Joystick",
"MapImage" : "extreme3dpro.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "Cyborg F.L.Y. 5",
"MapName" : "2: Cyborg F.L.Y. 5 Joystick",
"MapImage" : "fly5.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "Logitech G940 Stick + Throttle",
"MapName" : "1: Logitech G940 Joystick & Throttle",
"MapImage" : "g940.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "Logitech G940 Pedals",
"MapName" : "4: Logitech G940 Pedals",
"MapImage" : "g940pedals.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "VKB Gladiator",
"MapName" : "2: VKB Gladiator Joystick",
"MapImage" : "gladiator.jpg",
"InputDevices" :[
{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 349 KiB

After

Width:  |  Height:  |  Size: 396 KiB

@ -1,32 +1,32 @@
{
"MapName" : "XPad Elecom JC-U3613M (X-Input)",
"MapName" : "7: GPad Elecom JC-U3613M (X-Input)",
"MapImage" : "gpad-jc-u3613m.jpg",
"InputDevices" :[
{
"InputType": "G1",
"InputType": "G",
"DeviceName": "Elecom JC-U3613M",
"DeviceProdGuid": ["{028E045E-0000-0000-0000-504944564944}"],
"Controls": [
{ "Input":"x", "Type": "Digital", "X":2586, "Y":1254, "Width":770, "Height":108, "Cmt": "X"},
{ "Input":"a", "Type": "Digital", "X":2586, "Y":1132, "Width":770, "Height":108, "Cmt": "A"},
{ "Input":"b", "Type": "Digital", "X":2586, "Y":1010, "Width":770, "Height":108, "Cmt": "B"},
{ "Input":"y", "Type": "Digital", "X":2586, "Y":888, "Width":770, "Height":108, "Cmt": "Y"},
{ "Input":"shoulderl", "Type": "Digital", "X":784, "Y":632, "Width":770, "Height":108, "Cmt": "Left bumper - shoulderl"},
{ "Input":"shoulderr", "Type": "Digital", "X":2342, "Y":630, "Width":770, "Height":108, "Cmt": "Right bumper - shoulderr"},
{ "Input":"triggerl_btn", "Type": "Digital", "X":1049, "Y":492, "Width":770, "Height":108, "Cmt": "Left trigger - triggerl_btn"},
{ "Input":"triggerr_btn", "Type": "Digital", "X":2045, "Y":492, "Width":770, "Height":108, "Cmt": "Right trigger - triggerr_btn"},
{ "Input":"back", "Type": "Digital", "X":343, "Y":806, "Width":1000, "Height":54, "Cmt": "Back"},
{ "Input":"start", "Type": "Digital", "X":2431, "Y":806, "Width":1000, "Height":54, "Cmt": "Start"},
{ "Input":"thumbl", "Type": "Digital", "X":232, "Y":1035, "Width":1000, "Height":54, "Cmt": "Left stick button thumbl"},
{ "Input":"thumbr", "Type": "Digital", "X":2675, "Y":1567, "Width":1000, "Height":54, "Cmt": "Right stick button - thumbr"},
{ "Input":"dpad_up", "Type": "Digital", "X":274, "Y":1212, "Width":1000, "Height":54, "Cmt": "dpad_up"},
{ "Input":"dpad_right", "Type": "Digital", "X":274, "Y":1262, "Width":1000, "Height":54, "Cmt": "dpad_right"},
{ "Input":"dpad_down", "Type": "Digital", "X":274, "Y":1315, "Width":1000, "Height":54, "Cmt": "dpad_down"},
{ "Input":"dpad_left", "Type": "Digital", "X":274, "Y":1366, "Width":1000, "Height":54, "Cmt": "dpad_left"},
{ "Input":"thumbry", "Type": "Analogue", "X":2675, "Y":1465, "Width":1000, "Height":54, "Cmt": "thumbry"},
{ "Input":"thumbrx", "Type": "Analogue", "X":2675, "Y":1515, "Width":1000, "Height":54, "Cmt": "thumbrx"},
{ "Input":"thumbly", "Type": "Analogue", "X":232, "Y":932, "Width":1000, "Height":54, "Cmt": "thumbly"},
{ "Input":"thumblx", "Type": "Analogue", "X":232, "Y":984, "Width":1000, "Height":54, "Cmt": "thumblx"}
{ "Input":"x", "Type": "Digital", "X":2726, "Y":1401, "Width":987, "Height":150, "Cmt": "X"},
{ "Input":"a", "Type": "Digital", "X":2726, "Y":1232, "Width":987, "Height":150, "Cmt": "A"},
{ "Input":"b", "Type": "Digital", "X":2726, "Y":1062, "Width":987, "Height":150, "Cmt": "B"},
{ "Input":"y", "Type": "Digital", "X":2726, "Y":892, "Width":987, "Height":150, "Cmt": "Y"},
{ "Input":"shoulderl", "Type": "Digital", "X":564, "Y":383, "Width":987, "Height":204, "Cmt": "Left bumper - shoulderl"},
{ "Input":"shoulderr", "Type": "Digital", "X":2343, "Y":383, "Width":987, "Height":203, "Cmt": "Right bumper - shoulderr"},
{ "Input":"triggerl_btn", "Type": "Digital", "X":829, "Y":145, "Width":987, "Height":202, "Cmt": "Left trigger - triggerl_btn"},
{ "Input":"triggerr_btn", "Type": "Digital", "X":2046, "Y":144, "Width":987, "Height":203, "Cmt": "Right trigger - triggerr_btn"},
{ "Input":"back", "Type": "Digital", "X":343, "Y":729, "Width":987, "Height":95, "Cmt": "Back"},
{ "Input":"start", "Type": "Digital", "X":2584, "Y":716, "Width":987, "Height":95, "Cmt": "Start"},
{ "Input":"thumbl", "Type": "Digital", "X":233, "Y":1224, "Width":986, "Height":159, "Cmt": "Left stick button thumbl"},
{ "Input":"thumbr", "Type": "Digital", "X":2227, "Y":1891, "Width":1486, "Height":99, "Cmt": "Right stick button - thumbr"},
{ "Input":"dpad_up", "Type": "Digital", "X":300, "Y":1635, "Width":1478, "Height":101, "Cmt": "dpad_up"},
{ "Input":"dpad_right", "Type": "Digital", "X":300, "Y":1741, "Width":1478, "Height":103, "Cmt": "dpad_right"},
{ "Input":"dpad_down", "Type": "Digital", "X":300, "Y":1847, "Width":1478, "Height":99, "Cmt": "dpad_down"},
{ "Input":"dpad_left", "Type": "Digital", "X":300, "Y":1951, "Width":1478, "Height":103, "Cmt": "dpad_left"},
{ "Input":"thumbry", "Type": "Analogue", "X":2227, "Y":1679, "Width":1486, "Height":103, "Cmt": "thumbry"},
{ "Input":"thumbrx", "Type": "Analogue", "X":2227, "Y":1786, "Width":1486, "Height":100, "Cmt": "thumbrx"},
{ "Input":"thumbly", "Type": "Analogue", "X":233, "Y":907, "Width":986, "Height":155, "Cmt": "thumbly"},
{ "Input":"thumblx", "Type": "Analogue", "X":233, "Y":1067, "Width":986, "Height":152, "Cmt": "thumblx"}
]
}
]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 334 KiB

After

Width:  |  Height:  |  Size: 370 KiB

@ -1,32 +1,32 @@
{
"MapName" : "XPad Logitech F710",
"MapName" : "7: GPad Logitech F710",
"MapImage" : "gpad-logi-f710.jpg",
"InputDevices" :[
{
"InputType": "G1",
"InputType": "G",
"DeviceName": "Logitech F710",
"DeviceProdGuid": ["{028E045E-0000-0000-0000-504944564944}"],
"Controls": [
{ "Input":"x", "Type": "Digital", "X":2624, "Y":1299, "Width":770, "Height":108, "Cmt": "X"},
{ "Input":"a", "Type": "Digital", "X":2624, "Y":1169, "Width":770, "Height":108, "Cmt": "A"},
{ "Input":"b", "Type": "Digital", "X":2624, "Y":1041, "Width":770, "Height":108, "Cmt": "B"},
{ "Input":"y", "Type": "Digital", "X":2624, "Y":913, "Width":770, "Height":108, "Cmt": "Y"},
{ "Input":"shoulderl", "Type": "Digital", "X":784, "Y":632, "Width":770, "Height":108, "Cmt": "Left bumper - shoulderl"},
{ "Input":"shoulderr", "Type": "Digital", "X":2342, "Y":630, "Width":770, "Height":108, "Cmt": "Right bumper - shoulderr"},
{ "Input":"triggerl_btn", "Type": "Digital", "X":1051, "Y":494, "Width":770, "Height":108, "Cmt": "Left trigger - triggerl_btn"},
{ "Input":"triggerr_btn", "Type": "Digital", "X":2051, "Y":492, "Width":770, "Height":108, "Cmt": "Right trigger - triggerr_btn"},
{ "Input":"back", "Type": "Digital", "X":343, "Y":806, "Width":1000, "Height":54, "Cmt": "Back"},
{ "Input":"start", "Type": "Digital", "X":2537, "Y":820, "Width":1000, "Height":54, "Cmt": "Start"},
{ "Input":"thumbl", "Type": "Digital", "X":208, "Y":1517, "Width":1000, "Height":54, "Cmt": "Left stick button thumbl"},
{ "Input":"thumbr", "Type": "Digital", "X":2655, "Y":1619, "Width":1000, "Height":54, "Cmt": "Right stick button - thumbr"},
{ "Input":"dpad_up", "Type": "Digital", "X":231, "Y":947, "Width":1000, "Height":54, "Cmt": "dpad_up"},
{ "Input":"dpad_right", "Type": "Digital", "X":231, "Y":997, "Width":1000, "Height":54, "Cmt": "dpad_right"},
{ "Input":"dpad_down", "Type": "Digital", "X":231, "Y":1051, "Width":1000, "Height":54, "Cmt": "dpad_down"},
{ "Input":"dpad_left", "Type": "Digital", "X":231, "Y":1103, "Width":1000, "Height":54, "Cmt": "dpad_left"},
{ "Input":"thumbry", "Type": "Analogue", "X":2655, "Y":1517, "Width":1000, "Height":54, "Cmt": "thumbry"},
{ "Input":"thumbrx", "Type": "Analogue", "X":2655, "Y":1569, "Width":1000, "Height":54, "Cmt": "thumbrx"},
{ "Input":"thumbly", "Type": "Analogue", "X":208, "Y":1415, "Width":1000, "Height":54, "Cmt": "thumbly"},
{ "Input":"thumblx", "Type": "Analogue", "X":208, "Y":1465, "Width":1000, "Height":54, "Cmt": "thumblx"}
{ "Input":"x", "Type": "Digital", "X":2754, "Y":1493, "Width":987, "Height":150, "Cmt": "X"},
{ "Input":"a", "Type": "Digital", "X":2755, "Y":1323, "Width":987, "Height":150, "Cmt": "A"},
{ "Input":"b", "Type": "Digital", "X":2755, "Y":1153, "Width":987, "Height":150, "Cmt": "B"},
{ "Input":"y", "Type": "Digital", "X":2755, "Y":984, "Width":987, "Height":150, "Cmt": "Y"},
{ "Input":"shoulderl", "Type": "Digital", "X":594, "Y":475, "Width":987, "Height":204, "Cmt": "Left bumper - shoulderl"},
{ "Input":"shoulderr", "Type": "Digital", "X":2370, "Y":473, "Width":987, "Height":203, "Cmt": "Right bumper - shoulderr"},
{ "Input":"triggerl_btn", "Type": "Digital", "X":858, "Y":237, "Width":987, "Height":202, "Cmt": "Left trigger - triggerl_btn"},
{ "Input":"triggerr_btn", "Type": "Digital", "X":2074, "Y":235, "Width":987, "Height":203, "Cmt": "Right trigger - triggerr_btn"},
{ "Input":"back", "Type": "Digital", "X":370, "Y":821, "Width":987, "Height":95, "Cmt": "Back"},
{ "Input":"start", "Type": "Digital", "X":2612, "Y":806, "Width":987, "Height":95, "Cmt": "Start"},
{ "Input":"thumbl", "Type": "Digital", "X":264, "Y":1290, "Width":986, "Height":159, "Cmt": "Left stick button thumbl"},
{ "Input":"thumbr", "Type": "Digital", "X":2258, "Y":1956, "Width":1486, "Height":99, "Cmt": "Right stick button - thumbr"},
{ "Input":"dpad_up", "Type": "Digital", "X":331, "Y":1700, "Width":1478, "Height":101, "Cmt": "dpad_up"},
{ "Input":"dpad_right", "Type": "Digital", "X":331, "Y":1806, "Width":1478, "Height":103, "Cmt": "dpad_right"},
{ "Input":"dpad_down", "Type": "Digital", "X":331, "Y":1914, "Width":1478, "Height":99, "Cmt": "dpad_down"},
{ "Input":"dpad_left", "Type": "Digital", "X":331, "Y":2016, "Width":1478, "Height":103, "Cmt": "dpad_left"},
{ "Input":"thumbry", "Type": "Analogue", "X":2258, "Y":1744, "Width":1486, "Height":103, "Cmt": "thumbry"},
{ "Input":"thumbrx", "Type": "Analogue", "X":2258, "Y":1852, "Width":1486, "Height":100, "Cmt": "thumbrx"},
{ "Input":"thumbly", "Type": "Analogue", "X":264, "Y":974, "Width":986, "Height":155, "Cmt": "thumbly"},
{ "Input":"thumblx", "Type": "Analogue", "X":264, "Y":1132, "Width":986, "Height":152, "Cmt": "thumblx"}
]
}
]

@ -1,5 +1,5 @@
{
"MapName" : "ThrustMaster HOTAS 4",
"MapName" : "1: ThrustMaster HOTAS 4 Joystick & Throttle",
"MapImage" : "hotas4.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "ThrustMaster TFlight HOTASX",
"MapName" : "1: ThrustMaster TFlight HOTASX Joystick & Throttle",
"MapImage" : "hotasx.jpg",
"InputDevices" :[
{

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 KiB

@ -0,0 +1,76 @@
{
"MapName" : "8: Keyboard Bindings",
"MapImage" : "keyboard.jpg",
"InputDevices" :[
{
"InputType": "X",
"DeviceName": "Keyboard",
"DeviceProdGuid": ["{00000000-0000-0000-0000-000000000000}"],
"Controls": [
{ "Input":"~", "Type": "Key", "X":150, "Y":100, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":150, "Y":200, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":150, "Y":300, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":150, "Y":400, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":150, "Y":500, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":150, "Y":600, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":150, "Y":700, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":150, "Y":800, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":150, "Y":900, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":150, "Y":1000, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":150, "Y":1100, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":150, "Y":1200, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":150, "Y":1300, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":150, "Y":1400, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":150, "Y":1500, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":150, "Y":1600, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":150, "Y":1700, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":150, "Y":1800, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":150, "Y":1900, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":150, "Y":2000, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":1000, "Y":100, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":1000, "Y":200, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":1000, "Y":300, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":1000, "Y":400, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":1000, "Y":500, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":1000, "Y":600, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":1000, "Y":700, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":1000, "Y":800, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":1000, "Y":900, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":1000, "Y":1000, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":1000, "Y":1100, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":1000, "Y":1200, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":1000, "Y":1300, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":1000, "Y":1400, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":1000, "Y":1500, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":1000, "Y":1600, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":1000, "Y":1700, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":1000, "Y":1800, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":1000, "Y":1900, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":1000, "Y":2000, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":2000, "Y":100, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":2000, "Y":200, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":2000, "Y":300, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":2000, "Y":400, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":2000, "Y":500, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":2000, "Y":600, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":2000, "Y":700, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":2000, "Y":800, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":2000, "Y":900, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":2000, "Y":1000, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":2000, "Y":1100, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":2000, "Y":1200, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":2000, "Y":1300, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":2000, "Y":1400, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":2000, "Y":1500, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":2000, "Y":1600, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":2000, "Y":1700, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":2000, "Y":1800, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":2000, "Y":1900, "Width":770, "Height":108},
{ "Input":"~", "Type": "Key", "X":2000, "Y":2000, "Width":770, "Height":108}
]
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 KiB

@ -0,0 +1,90 @@
{
"MapName" : "8: Keyboard Layout",
"MapImage" : "keyboard1.jpg",
"InputDevices" :[
{
"FontFamily": "Gill Sans Nova Cond",
"InputType": "K",
"DeviceName": "Keyboard",
"DeviceProdGuid": ["{00000000-0000-0000-0000-000000000000}"],
"Controls": [
{ "Input":"escape", "Type": "Digital", "X":124, "Y":320, "Width":235, "Height":205, "Cmt":""},
{ "Input":"f1", "Type": "Digital", "X":475, "Y":320, "Width":235, "Height":205, "Cmt":""},
{ "Input":"f2", "Type": "Digital", "X":719, "Y":320, "Width":235, "Height":205, "Cmt":""},
{ "Input":"f3", "Type": "Digital", "X":963, "Y":320, "Width":235, "Height":205, "Cmt":""},
{ "Input":"f4", "Type": "Digital", "X":1207, "Y":320, "Width":235, "Height":205, "Cmt":""},
{ "Input":"f5", "Type": "Digital", "X":1570, "Y":320, "Width":235, "Height":205, "Cmt":""},
{ "Input":"f6", "Type": "Digital", "X":1816, "Y":320, "Width":235, "Height":205, "Cmt":""},
{ "Input":"f7", "Type": "Digital", "X":2060, "Y":320, "Width":235, "Height":205, "Cmt":""},
{ "Input":"f8", "Type": "Digital", "X":2304, "Y":320, "Width":235, "Height":205, "Cmt":""},
{ "Input":"f9", "Type": "Digital", "X":2667, "Y":320, "Width":235, "Height":205, "Cmt":""},
{ "Input":"f10", "Type": "Digital", "X":2911, "Y":320, "Width":235, "Height":205, "Cmt":""},
{ "Input":"f11", "Type": "Digital", "X":3155, "Y":320, "Width":235, "Height":205, "Cmt":""},
{ "Input":"f12", "Type": "Digital", "X":3399, "Y":320, "Width":235, "Height":205, "Cmt":""},
{ "Input":"grave", "Type": "Digital", "X":124, "Y":636, "Width":235, "Height":205, "Cmt":""},
{ "Input":"1", "Type": "Digital", "X":370, "Y":636, "Width":235, "Height":205, "Cmt":""},
{ "Input":"2", "Type": "Digital", "X":614, "Y":636, "Width":235, "Height":205, "Cmt":""},
{ "Input":"3", "Type": "Digital", "X":858, "Y":636, "Width":235, "Height":205, "Cmt":""},
{ "Input":"4", "Type": "Digital", "X":1100, "Y":636, "Width":235, "Height":205, "Cmt":""},
{ "Input":"5", "Type": "Digital", "X":1344, "Y":636, "Width":235, "Height":205, "Cmt":""},
{ "Input":"6", "Type": "Digital", "X":1590, "Y":636, "Width":235, "Height":205, "Cmt":""},
{ "Input":"7", "Type": "Digital", "X":1834, "Y":636, "Width":235, "Height":205, "Cmt":""},
{ "Input":"8", "Type": "Digital", "X":2078, "Y":636, "Width":235, "Height":205, "Cmt":""},
{ "Input":"9", "Type": "Digital", "X":2322, "Y":636, "Width":235, "Height":205, "Cmt":""},
{ "Input":"0", "Type": "Digital", "X":2566, "Y":636, "Width":235, "Height":205, "Cmt":""},
{ "Input":"minus", "Type": "Digital", "X":2809, "Y":636, "Width":235, "Height":205, "Cmt":""},
{ "Input":"equals", "Type": "Digital", "X":3053, "Y":636, "Width":235, "Height":205, "Cmt":""},
{ "Input":"backspace", "Type": "Digital", "X":3297, "Y":636, "Width":404, "Height":205, "Cmt":""},
{ "Input":"tab", "Type": "Digital", "X":126, "Y":896, "Width":357, "Height":205, "Cmt":""},
{ "Input":"q", "Type": "Digital", "X":491, "Y":896, "Width":235, "Height":205, "Cmt":""},
{ "Input":"w", "Type": "Digital", "X":735, "Y":896, "Width":235, "Height":205, "Cmt":""},
{ "Input":"e", "Type": "Digital", "X":979, "Y":896, "Width":235, "Height":205, "Cmt":""},
{ "Input":"r", "Type": "Digital", "X":1223, "Y":896, "Width":235, "Height":205, "Cmt":""},
{ "Input":"t", "Type": "Digital", "X":1467, "Y":896, "Width":235, "Height":205, "Cmt":""},
{ "Input":"y", "Type": "Digital", "X":1711, "Y":896, "Width":235, "Height":205, "Cmt":""},
{ "Input":"u", "Type": "Digital", "X":1955, "Y":896, "Width":235, "Height":205, "Cmt":""},
{ "Input":"i", "Type": "Digital", "X":2199, "Y":896, "Width":235, "Height":205, "Cmt":""},
{ "Input":"o", "Type": "Digital", "X":2443, "Y":896, "Width":235, "Height":205, "Cmt":""},
{ "Input":"p", "Type": "Digital", "X":2687, "Y":896, "Width":235, "Height":205, "Cmt":""},
{ "Input":"lbracket", "Type": "Digital", "X":2931, "Y":896, "Width":235, "Height":205, "Cmt":""},
{ "Input":"rbracket", "Type": "Digital", "X":3175, "Y":896, "Width":235, "Height":205, "Cmt":""},
{ "Input":"enter", "Type": "Digital", "X":3465, "Y":938, "Width":235, "Height":205, "Cmt":""},
{ "Input":"capslock", "Type": "Digital", "X":126, "Y":1157, "Width":400, "Height":205, "Cmt":""},
{ "Input":"a", "Type": "Digital", "X":538, "Y":1157, "Width":235, "Height":205, "Cmt":""},
{ "Input":"s", "Type": "Digital", "X":782, "Y":1157, "Width":235, "Height":205, "Cmt":""},
{ "Input":"d", "Type": "Digital", "X":1026, "Y":1157, "Width":235, "Height":205, "Cmt":""},
{ "Input":"f", "Type": "Digital", "X":1270, "Y":1157, "Width":235, "Height":205, "Cmt":""},
{ "Input":"g", "Type": "Digital", "X":1514, "Y":1158, "Width":235, "Height":205, "Cmt":""},
{ "Input":"h", "Type": "Digital", "X":1758, "Y":1157, "Width":235, "Height":205, "Cmt":""},
{ "Input":"j", "Type": "Digital", "X":2003, "Y":1158, "Width":235, "Height":205, "Cmt":""},
{ "Input":"k", "Type": "Digital", "X":2247, "Y":1158, "Width":235, "Height":205, "Cmt":""},
{ "Input":"l", "Type": "Digital", "X":2491, "Y":1158, "Width":235, "Height":205, "Cmt":""},
{ "Input":"semicolon", "Type": "Digital", "X":2734, "Y":1158, "Width":235, "Height":205, "Cmt":""},
{ "Input":"apostrophe", "Type": "Digital", "X":2979, "Y":1158, "Width":235, "Height":205, "Cmt":""},
{ "Input":"backslash", "Type": "Digital", "X":3223, "Y":1158, "Width":235, "Height":205, "Cmt":""},
{ "Input":"lshift", "Type": "Digital", "X":129, "Y":1418, "Width":235, "Height":205, "Cmt":""},
{ "Input":"z", "Type": "Digital", "X":719, "Y":1418, "Width":235, "Height":205, "Cmt":""},
{ "Input":"x", "Type": "Digital", "X":963, "Y":1418, "Width":235, "Height":205, "Cmt":""},
{ "Input":"c", "Type": "Digital", "X":1207, "Y":1418, "Width":235, "Height":205, "Cmt":""},
{ "Input":"v", "Type": "Digital", "X":1451, "Y":1418, "Width":235, "Height":205, "Cmt":""},
{ "Input":"b", "Type": "Digital", "X":1695, "Y":1418, "Width":235, "Height":205, "Cmt":""},
{ "Input":"n", "Type": "Digital", "X":1939, "Y":1418, "Width":235, "Height":205, "Cmt":""},
{ "Input":"m", "Type": "Digital", "X":2183, "Y":1418, "Width":235, "Height":205, "Cmt":""},
{ "Input":"comma", "Type": "Digital", "X":2427, "Y":1418, "Width":235, "Height":205, "Cmt":""},
{ "Input":"period", "Type": "Digital", "X":2671, "Y":1418, "Width":235, "Height":205, "Cmt":""},
{ "Input":"slash", "Type": "Digital", "X":2914, "Y":1418, "Width":235, "Height":205, "Cmt":""},
{ "Input":"rshift", "Type": "Digital", "X":3402, "Y":1418, "Width":299, "Height":205, "Cmt":""},
{ "Input":"lctrl", "Type": "Digital", "X":129, "Y":1678, "Width":267, "Height":205, "Cmt":""},
{ "Input":"lalt", "Type": "Digital", "X":677, "Y":1678, "Width":267, "Height":205, "Cmt":""},
{ "Input":"space", "Type": "Digital", "X":956, "Y":1678, "Width":1654, "Height":205, "Cmt":""},
{ "Input":"ralt", "Type": "Digital", "X":2614, "Y":1678, "Width":267, "Height":205, "Cmt":""},
{ "Input":"rctrl", "Type": "Digital", "X":3436, "Y":1678, "Width":267, "Height":205, "Cmt":""}
]
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 KiB

@ -0,0 +1,64 @@
{
"MapName" : "8: Numpad, Navigation Layout & Mouse",
"MapImage" : "mouse-numpad.jpg",
"InputDevices" :[
{
"FontFamily": "Gill Sans Nova Cond",
"InputType": "K1",
"DeviceName": "Keyboard",
"DeviceProdGuid": ["{00000000-0000-0000-0000-000000000000}"],
"Controls": [
{ "Input":"print", "Type": "Digital", "X":107, "Y":340, "Width":235, "Height":205, "Cmt":""},
{ "Input":"scrolllock", "Type": "Digital", "X":351, "Y":339, "Width":235, "Height":205, "Cmt":""},
{ "Input":"pause", "Type": "Digital", "X":595, "Y":340, "Width":235, "Height":205, "Cmt":""},
{ "Input":"insert", "Type": "Digital", "X":107, "Y":685, "Width":235, "Height":205, "Cmt":""},
{ "Input":"home", "Type": "Digital", "X":351, "Y":685, "Width":235, "Height":205, "Cmt":""},
{ "Input":"pgup", "Type": "Digital", "X":595, "Y":685, "Width":235, "Height":205, "Cmt":""},
{ "Input":"delete", "Type": "Digital", "X":107, "Y":928, "Width":235, "Height":205, "Cmt":""},
{ "Input":"end", "Type": "Digital", "X":351, "Y":928, "Width":235, "Height":205, "Cmt":""},
{ "Input":"pgdown", "Type": "Digital", "X":595, "Y":928, "Width":235, "Height":205, "Cmt":""},
{ "Input":"up", "Type": "Digital", "X":351, "Y":1416, "Width":235, "Height":205, "Cmt":""},
{ "Input":"left", "Type": "Digital", "X":107, "Y":1660, "Width":235, "Height":205, "Cmt":""},
{ "Input":"down", "Type": "Digital", "X":351, "Y":1660, "Width":235, "Height":205, "Cmt":""},
{ "Input":"right", "Type": "Digital", "X":595, "Y":1660, "Width":235, "Height":205, "Cmt":""},
{ "Input":"numlock", "Type": "Digital", "X":939, "Y":685, "Width":235, "Height":205, "Cmt":""},
{ "Input":"np_divide", "Type": "Digital", "X":1183, "Y":685, "Width":235, "Height":205, "Cmt":""},
{ "Input":"np_multiply", "Type": "Digital", "X":1427, "Y":685, "Width":235, "Height":205, "Cmt":""},
{ "Input":"np_subtract", "Type": "Digital", "X":1670, "Y":685, "Width":235, "Height":205, "Cmt":""},
{ "Input":"np_7", "Type": "Digital", "X":939, "Y":928, "Width":235, "Height":205, "Cmt":""},
{ "Input":"np_8", "Type": "Digital", "X":1183, "Y":928, "Width":235, "Height":205, "Cmt":""},
{ "Input":"np_9", "Type": "Digital", "X":1427, "Y":928, "Width":235, "Height":205, "Cmt":""},
{ "Input":"np_add", "Type": "Digital", "X":1670, "Y":956, "Width":235, "Height":450, "Cmt":""},
{ "Input":"np_4", "Type": "Digital", "X":939, "Y":1172, "Width":235, "Height":205, "Cmt":""},
{ "Input":"np_5", "Type": "Digital", "X":1183, "Y":1172, "Width":235, "Height":205, "Cmt":""},
{ "Input":"np_6", "Type": "Digital", "X":1427, "Y":1172, "Width":235, "Height":205, "Cmt":""},
{ "Input":"np_1", "Type": "Digital", "X":939, "Y":1416, "Width":235, "Height":205, "Cmt":""},
{ "Input":"np_2", "Type": "Digital", "X":1183, "Y":1416, "Width":235, "Height":205, "Cmt":""},
{ "Input":"np_3", "Type": "Digital", "X":1427, "Y":1416, "Width":235, "Height":205, "Cmt":""},
{ "Input":"np_enter", "Type": "Digital", "X":1670, "Y":1444, "Width":235, "Height":450, "Cmt":""},
{ "Input":"np_0", "Type": "Digital", "X":939, "Y":1672, "Width":235, "Height":205, "Cmt":""},
{ "Input":"np_period", "Type": "Digital", "X":1427, "Y":1660, "Width":235, "Height":205, "Cmt":""}
]
},
{
"InputType": "M1",
"DeviceName": "Mouse",
"DeviceProdGuid": ["{10001000-0000-0000-0000-000000000000}"],
"Controls": [
{ "Input":"mouse1", "Type": "Digital", "X":2142, "Y":654, "Width":755, "Height":205, "Cmt":""},
{ "Input":"mouse2", "Type": "Digital", "X":3003, "Y":656, "Width":755, "Height":205, "Cmt":""},
{ "Input":"mouse3", "Type": "Digital", "X":2460, "Y":378, "Width":985, "Height":205, "Cmt":""},
{ "Input":"mouse4", "Type": "Digital", "X":2142, "Y":1115, "Width":535, "Height":205, "Cmt":""},
{ "Input":"mouse5", "Type": "Digital", "X":2142, "Y":884, "Width":535, "Height":205, "Cmt":""},
{ "Input":"mouse6", "Type": "Digital", "X":2459, "Y":1717, "Width":985, "Height":50, "Cmt":""},
{ "Input":"mouse7", "Type": "Digital", "X":2459, "Y":1769, "Width":985, "Height":50, "Cmt":""},
{ "Input":"mouse8", "Type": "Digital", "X":2459, "Y":1819, "Width":985, "Height":50, "Cmt":""},
{ "Input":"mwheel_up", "Type": "Digital", "X":2460, "Y":276, "Width":985, "Height":50, "Cmt":""},
{ "Input":"mwheel_down", "Type": "Digital", "X":2460, "Y":326, "Width":985, "Height":50, "Cmt":""},
{ "Input":"maxis_x", "Type": "Analogue", "X":2459, "Y":178, "Width":985, "Height":50, "Cmt":""},
{ "Input":"maxis_y", "Type": "Analogue", "X":2459, "Y":129, "Width":985, "Height":50, "Cmt":""}
]
}
]
}

@ -1,5 +1,5 @@
{
"MapName" : "Saitek ProFlight Combat Rudder Pedals",
"MapName" : "4: Saitek ProFlight Combat Rudder Pedals",
"MapImage" : "proflightcombatpedals.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "Saitek ProFlight Rudder Pedals",
"MapName" : "4: Saitek ProFlight Rudder Pedals",
"MapImage" : "proflightpedals.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "Saitek Side Panel Control Deck",
"MapName" : "5: Saitek Side Panel Control Deck",
"MapImage" : "sidepanelcontroldeck.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "Slaw BF-109 Pedals",
"MapName" : "4: Slaw BF-109 Pedals",
"MapImage" : "slawbf109pedals.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "ThrustMaster T.Flight X",
"MapName" : "2: ThrustMaster T.Flight X Joystick",
"MapImage" : "stickx.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "T.16000M Joystick (right)",
"MapName" : "2: T.16000M (right hand Joystick)",
"MapImage" : "t16000m.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "T.16000M DUO Joystick (left-right)",
"MapName" : "1: T.16000M DUO Joystick (left - right)",
"MapImage" : "t16000mduo-left-right.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "T.16000M DUO Joystick (right-left)",
"MapName" : "1: T.16000M DUO Joystick (right - left)",
"MapImage" : "t16000mduo-left-right.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "T.16000M FCS",
"MapName" : "1: T.16000M FCS Joystick & Throttle",
"MapImage" : "t16000mfcs.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "ThrustMaster T-Flight Pedals",
"MapName" : "4: ThrustMaster T-Flight Pedals",
"MapImage" : "tfrpedals.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "VPC WarBRD Delta (left)",
"MapName" : "2: VPC WarBRD Delta (left hand Joystick)",
"MapImage" : "vpc-warbrd-delta-left.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "VPC WarBRD Delta (right)",
"MapName" : "2: VPC WarBRD Delta (right hand Joystick)",
"MapImage" : "vpc-warbrd-delta-right.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "VPC WarBRD Delta DUO (left - right)",
"MapName" : "1: VPC WarBRD Delta DUO (left - right)",
"MapImage" : "vpc-wb-delta-left-right.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "Warthog Throttle and Joystick",
"MapName" : "1: Warthog Joystick & Throttle",
"MapImage" : "warthog.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "x45-joystick+throttle",
"MapName" : "1: X45 Joystick & Throttle",
"MapImage" : "x45.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "x52-joystick+throttle",
"MapName" : "1: X52 Joystick & Throttle",
"MapImage" : "x52.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "x52pro-joystick+throttle",
"MapName" : "1: X52pro Joystick & Throttle",
"MapImage" : "x52pro.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "x55-joystick",
"MapName" : "2: X55 Joystick",
"MapImage" : "x55-joystick.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "x55 Throttle and Joystick",
"MapName" : "1: X55 Joystick & Throttle",
"MapImage" : "x55-throttle+stick.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "x55-throttle",
"MapName" : "3: X55 Throttle",
"MapImage" : "x55-throttle.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "x56-joystick",
"MapName" : "2: X56 Joystick",
"MapImage" : "x56-joystick.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "x56 Throttle and Joystick",
"MapName" : "1: X56 Joystick & Throttle",
"MapImage" : "x56-throttle+stick.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "x65F-throttle + x55-stick",
"MapName" : "1: X55 Joystick & X65F Throttle",
"MapImage" : "x65F-throttle+x55-stick.jpg",
"InputDevices" :[
{

@ -1,5 +1,5 @@
{
"MapName" : "x65F-joystick and throttle",
"MapName" : "1: X65F Joystick & Throttle",
"MapImage" : "x65F.jpg",
"InputDevices" :[
{

Loading…
Cancel
Save