awful vs text file format change …

This commit is contained in:
alterNERDtive 2020-11-08 12:41:36 +01:00
parent 3b918e8972
commit 5a502b155d
7 changed files with 424 additions and 424 deletions

View file

@ -1,7 +1,7 @@
# All files
[*]
guidelines = 80
# C# or VB files
[*.{cs,vb}]
# All files
[*]
guidelines = 80
# C# or VB files
[*.{cs,vb}]
guidelines = 80, 120

10
.gitignore vendored
View file

@ -1,5 +1,5 @@
.vs/**
obj/**
bin/**
bindEDplugin.csproj.user
*.zip
.vs/**
obj/**
bin/**
bindEDplugin.csproj.user
*.zip

View file

@ -1,7 +1,7 @@
# 2.0 (2020-09-23)
## Added
* Support for non-US keyboard layouts. `de-neo2` is included (because thats
what Im using), others can be added ([see the wiki for
# 2.0 (2020-09-23)
## Added
* Support for non-US keyboard layouts. `de-neo2` is included (because thats
what Im using), others can be added ([see the wiki for
instructions](https://github.com/alterNERDtive/bindED/wiki/Keyboard-Layouts)).

View file

@ -1,165 +1,165 @@
Key_Backspace;8
Key_Tab;9
Key_Enter;13
Key_Pause;19
Key_CapsLock;20
Key_Kana;21
Key_Kanji;25
Key_Escape;27
Key_Convert;28
Key_NoConvert;29
Key_Space;32
Key_PageUp;33
Key_PageDown;34
Key_End;35
Key_Home;36
Key_LeftArrow;37
Key_UpArrow;38
Key_RightArrow;39
Key_DownArrow;40
Key_SYSRQ;44
Key_Insert;45
Key_Delete;46
Key_0;48
Key_1;49
Key_2;50
Key_3;51
Key_4;52
Key_5;53
Key_6;54
Key_7;55
Key_8;56
Key_9;57
Key_A;85
Key_B;90
Key_C;222
Key_D;65
Key_E;76
Key_F;69
Key_G;79
Key_H;83
Key_I;71
Key_J;78
Key_K;82
Key_L;84
Key_M;77
Key_N;66
Key_O;70
Key_P;81
Key_Q;88
Key_R;67
Key_S;73
Key_T;87
Key_U;72
Key_V;80
Key_W;86
Key_X;221
Key_Y;75
Key_Z;220
Key_LeftWin;91
Key_RightWin;92
Key_Apps;93
Key_Sleep;95
Key_Numpad_0;96
Key_Numpad_1;97
Key_Numpad_2;98
Key_Numpad_3;99
Key_Numpad_4;100
Key_Numpad_5;101
Key_Numpad_6;102
Key_Numpad_7;103
Key_Numpad_8;104
Key_Numpad_9;105
Key_Numpad_Multiply;106
Key_Numpad_Add;107
Key_Numpad_Subtract;109
Key_Numpad_Decimal;110
Key_Numpad_Comma;110
Key_Numpad_Divide;111
Key_Numpad_Enter;156
Key_F1;112
Key_F2;113
Key_F3;114
Key_F4;115
Key_F5;116
Key_F6;117
Key_F7;118
Key_F8;119
Key_F9;120
Key_F10;121
Key_F11;122
Key_F12;123
Key_F13;124
Key_F14;125
Key_F15;126
Key_F16;127
Key_F17;128
Key_F18;129
Key_F19;130
Key_F20;131
Key_F21;132
Key_F22;133
Key_F23;134
Key_F24;135
Key_NumLock;144
Key_ScrollLock;145
Key_LeftShift;160
Key_RightShift;161
Key_LeftControl;162
Key_RightControl;163
Key_LeftAlt;164
Key_RightAlt;165
Key_WebBack;166
Key_WebForward;167
Key_WebRefresh;168
Key_WebStop;169
Key_WebSearch;170
Key_WebFavourites;171
Key_WebHome;172
Key_Mute;173
Key_VolumeDown;174
Key_VolumeUp;175
Key_NextTrack;176
Key_PrevTrack;177
Key_MediaStop;178
Key_Stop;178
Key_PlayPause;179
Key_Mail;180
Key_MediaSelect;181
Key_SemiColon;68
Key_Plus;187
Key_Equals;191
Key_Comma;188
Key_Minus;189
Key_Period;190
Key_Slash;74
Key_Grave;186
Key_LeftBracket;192
Key_BackSlash;223
Key_RightBracket;219
Key_Apostrophe;89
Key_OEM_102;226
Key_ä;222
Key_ö;192
Key_ü;186
Key_ß;219
Key_Acute;221
Key_LessThan;226
Key_Circumflex;220
Key_Hash;226
Key_Colon;186
Key_ABNT_C1;-1
Key_Yen;-1
Key_ABNT_C2;-1
Key_Numpad_Equals;-1
Key_Underline;-1
Key_AX;-1
Key_Unlabeled;-1
Key_Calculator;-1
Key_AT;-1
Key_Power;-1
Key_Wake;-1
Key_MyComputer;-1
Key_GreenModifier;-1
Key_Backspace;8
Key_Tab;9
Key_Enter;13
Key_Pause;19
Key_CapsLock;20
Key_Kana;21
Key_Kanji;25
Key_Escape;27
Key_Convert;28
Key_NoConvert;29
Key_Space;32
Key_PageUp;33
Key_PageDown;34
Key_End;35
Key_Home;36
Key_LeftArrow;37
Key_UpArrow;38
Key_RightArrow;39
Key_DownArrow;40
Key_SYSRQ;44
Key_Insert;45
Key_Delete;46
Key_0;48
Key_1;49
Key_2;50
Key_3;51
Key_4;52
Key_5;53
Key_6;54
Key_7;55
Key_8;56
Key_9;57
Key_A;85
Key_B;90
Key_C;222
Key_D;65
Key_E;76
Key_F;69
Key_G;79
Key_H;83
Key_I;71
Key_J;78
Key_K;82
Key_L;84
Key_M;77
Key_N;66
Key_O;70
Key_P;81
Key_Q;88
Key_R;67
Key_S;73
Key_T;87
Key_U;72
Key_V;80
Key_W;86
Key_X;221
Key_Y;75
Key_Z;220
Key_LeftWin;91
Key_RightWin;92
Key_Apps;93
Key_Sleep;95
Key_Numpad_0;96
Key_Numpad_1;97
Key_Numpad_2;98
Key_Numpad_3;99
Key_Numpad_4;100
Key_Numpad_5;101
Key_Numpad_6;102
Key_Numpad_7;103
Key_Numpad_8;104
Key_Numpad_9;105
Key_Numpad_Multiply;106
Key_Numpad_Add;107
Key_Numpad_Subtract;109
Key_Numpad_Decimal;110
Key_Numpad_Comma;110
Key_Numpad_Divide;111
Key_Numpad_Enter;156
Key_F1;112
Key_F2;113
Key_F3;114
Key_F4;115
Key_F5;116
Key_F6;117
Key_F7;118
Key_F8;119
Key_F9;120
Key_F10;121
Key_F11;122
Key_F12;123
Key_F13;124
Key_F14;125
Key_F15;126
Key_F16;127
Key_F17;128
Key_F18;129
Key_F19;130
Key_F20;131
Key_F21;132
Key_F22;133
Key_F23;134
Key_F24;135
Key_NumLock;144
Key_ScrollLock;145
Key_LeftShift;160
Key_RightShift;161
Key_LeftControl;162
Key_RightControl;163
Key_LeftAlt;164
Key_RightAlt;165
Key_WebBack;166
Key_WebForward;167
Key_WebRefresh;168
Key_WebStop;169
Key_WebSearch;170
Key_WebFavourites;171
Key_WebHome;172
Key_Mute;173
Key_VolumeDown;174
Key_VolumeUp;175
Key_NextTrack;176
Key_PrevTrack;177
Key_MediaStop;178
Key_Stop;178
Key_PlayPause;179
Key_Mail;180
Key_MediaSelect;181
Key_SemiColon;68
Key_Plus;187
Key_Equals;191
Key_Comma;188
Key_Minus;189
Key_Period;190
Key_Slash;74
Key_Grave;186
Key_LeftBracket;192
Key_BackSlash;223
Key_RightBracket;219
Key_Apostrophe;89
Key_OEM_102;226
Key_ä;222
Key_ö;192
Key_ü;186
Key_ß;219
Key_Acute;221
Key_LessThan;226
Key_Circumflex;220
Key_Hash;226
Key_Colon;186
Key_ABNT_C1;-1
Key_Yen;-1
Key_ABNT_C2;-1
Key_Numpad_Equals;-1
Key_Underline;-1
Key_AX;-1
Key_Unlabeled;-1
Key_Calculator;-1
Key_AT;-1
Key_Power;-1
Key_Wake;-1
Key_MyComputer;-1
Key_GreenModifier;-1
Key_OrangeModifier;-1

View file

@ -1,165 +1,165 @@
Key_Backspace;8
Key_Tab;9
Key_Enter;13
Key_Pause;19
Key_CapsLock;20
Key_Kana;21
Key_Kanji;25
Key_Escape;27
Key_Convert;28
Key_NoConvert;29
Key_Space;32
Key_PageUp;33
Key_PageDown;34
Key_End;35
Key_Home;36
Key_LeftArrow;37
Key_UpArrow;38
Key_RightArrow;39
Key_DownArrow;40
Key_SYSRQ;44
Key_Insert;45
Key_Delete;46
Key_0;48
Key_1;49
Key_2;50
Key_3;51
Key_4;52
Key_5;53
Key_6;54
Key_7;55
Key_8;56
Key_9;57
Key_A;65
Key_B;66
Key_C;67
Key_D;68
Key_E;69
Key_F;70
Key_G;71
Key_H;72
Key_I;73
Key_J;74
Key_K;75
Key_L;76
Key_M;77
Key_N;78
Key_O;79
Key_P;80
Key_Q;81
Key_R;82
Key_S;83
Key_T;84
Key_U;85
Key_V;86
Key_W;87
Key_X;88
Key_Y;89
Key_Z;90
Key_LeftWin;91
Key_RightWin;92
Key_Apps;93
Key_Sleep;95
Key_Numpad_0;96
Key_Numpad_1;97
Key_Numpad_2;98
Key_Numpad_3;99
Key_Numpad_4;100
Key_Numpad_5;101
Key_Numpad_6;102
Key_Numpad_7;103
Key_Numpad_8;104
Key_Numpad_9;105
Key_Numpad_Multiply;106
Key_Numpad_Add;107
Key_Numpad_Subtract;109
Key_Numpad_Decimal;110
Key_Numpad_Comma;110
Key_Numpad_Divide;111
Key_Numpad_Enter;156
Key_F1;112
Key_F2;113
Key_F3;114
Key_F4;115
Key_F5;116
Key_F6;117
Key_F7;118
Key_F8;119
Key_F9;120
Key_F10;121
Key_F11;122
Key_F12;123
Key_F13;124
Key_F14;125
Key_F15;126
Key_F16;127
Key_F17;128
Key_F18;129
Key_F19;130
Key_F20;131
Key_F21;132
Key_F22;133
Key_F23;134
Key_F24;135
Key_NumLock;144
Key_ScrollLock;145
Key_LeftShift;160
Key_RightShift;161
Key_LeftControl;162
Key_RightControl;163
Key_LeftAlt;164
Key_RightAlt;165
Key_WebBack;166
Key_WebForward;167
Key_WebRefresh;168
Key_WebStop;169
Key_WebSearch;170
Key_WebFavourites;171
Key_WebHome;172
Key_Mute;173
Key_VolumeDown;174
Key_VolumeUp;175
Key_NextTrack;176
Key_PrevTrack;177
Key_MediaStop;178
Key_Stop;178
Key_PlayPause;179
Key_Mail;180
Key_MediaSelect;181
Key_SemiColon;186
Key_Plus;187
Key_Equals;187
Key_Comma;188
Key_Minus;189
Key_Period;190
Key_Slash;191
Key_Grave;192
Key_LeftBracket;219
Key_BackSlash;220
Key_RightBracket;221
Key_Apostrophe;222
Key_OEM_102;226
Key_ä;222
Key_ö;192
Key_ü;186
Key_ß;219
Key_Acute;221
Key_LessThan;226
Key_Circumflex;220
Key_Hash;191
Key_Colon;186
Key_ABNT_C1;-1
Key_Yen;-1
Key_ABNT_C2;-1
Key_Numpad_Equals;-1
Key_Underline;-1
Key_AX;-1
Key_Unlabeled;-1
Key_Calculator;-1
Key_AT;-1
Key_Power;-1
Key_Wake;-1
Key_MyComputer;-1
Key_GreenModifier;-1
Key_Backspace;8
Key_Tab;9
Key_Enter;13
Key_Pause;19
Key_CapsLock;20
Key_Kana;21
Key_Kanji;25
Key_Escape;27
Key_Convert;28
Key_NoConvert;29
Key_Space;32
Key_PageUp;33
Key_PageDown;34
Key_End;35
Key_Home;36
Key_LeftArrow;37
Key_UpArrow;38
Key_RightArrow;39
Key_DownArrow;40
Key_SYSRQ;44
Key_Insert;45
Key_Delete;46
Key_0;48
Key_1;49
Key_2;50
Key_3;51
Key_4;52
Key_5;53
Key_6;54
Key_7;55
Key_8;56
Key_9;57
Key_A;65
Key_B;66
Key_C;67
Key_D;68
Key_E;69
Key_F;70
Key_G;71
Key_H;72
Key_I;73
Key_J;74
Key_K;75
Key_L;76
Key_M;77
Key_N;78
Key_O;79
Key_P;80
Key_Q;81
Key_R;82
Key_S;83
Key_T;84
Key_U;85
Key_V;86
Key_W;87
Key_X;88
Key_Y;89
Key_Z;90
Key_LeftWin;91
Key_RightWin;92
Key_Apps;93
Key_Sleep;95
Key_Numpad_0;96
Key_Numpad_1;97
Key_Numpad_2;98
Key_Numpad_3;99
Key_Numpad_4;100
Key_Numpad_5;101
Key_Numpad_6;102
Key_Numpad_7;103
Key_Numpad_8;104
Key_Numpad_9;105
Key_Numpad_Multiply;106
Key_Numpad_Add;107
Key_Numpad_Subtract;109
Key_Numpad_Decimal;110
Key_Numpad_Comma;110
Key_Numpad_Divide;111
Key_Numpad_Enter;156
Key_F1;112
Key_F2;113
Key_F3;114
Key_F4;115
Key_F5;116
Key_F6;117
Key_F7;118
Key_F8;119
Key_F9;120
Key_F10;121
Key_F11;122
Key_F12;123
Key_F13;124
Key_F14;125
Key_F15;126
Key_F16;127
Key_F17;128
Key_F18;129
Key_F19;130
Key_F20;131
Key_F21;132
Key_F22;133
Key_F23;134
Key_F24;135
Key_NumLock;144
Key_ScrollLock;145
Key_LeftShift;160
Key_RightShift;161
Key_LeftControl;162
Key_RightControl;163
Key_LeftAlt;164
Key_RightAlt;165
Key_WebBack;166
Key_WebForward;167
Key_WebRefresh;168
Key_WebStop;169
Key_WebSearch;170
Key_WebFavourites;171
Key_WebHome;172
Key_Mute;173
Key_VolumeDown;174
Key_VolumeUp;175
Key_NextTrack;176
Key_PrevTrack;177
Key_MediaStop;178
Key_Stop;178
Key_PlayPause;179
Key_Mail;180
Key_MediaSelect;181
Key_SemiColon;186
Key_Plus;187
Key_Equals;187
Key_Comma;188
Key_Minus;189
Key_Period;190
Key_Slash;191
Key_Grave;192
Key_LeftBracket;219
Key_BackSlash;220
Key_RightBracket;221
Key_Apostrophe;222
Key_OEM_102;226
Key_ä;222
Key_ö;192
Key_ü;186
Key_ß;219
Key_Acute;221
Key_LessThan;226
Key_Circumflex;220
Key_Hash;191
Key_Colon;186
Key_ABNT_C1;-1
Key_Yen;-1
Key_ABNT_C2;-1
Key_Numpad_Equals;-1
Key_Underline;-1
Key_AX;-1
Key_Unlabeled;-1
Key_Calculator;-1
Key_AT;-1
Key_Power;-1
Key_Wake;-1
Key_MyComputer;-1
Key_GreenModifier;-1
Key_OrangeModifier;-1

104
README.md
View file

@ -1,53 +1,53 @@
# bindED
This VoiceAttack plugin reads keybindings in Elite:Dangerous and stores them as
VoiceAttack variables. It has originally been written by Gary (the developer of
VoiceAttack) [and published on the VoiceAttack
forums](https://forum.voiceattack.com/smf/index.php?topic=564.0).
You can find the [original README here](ReadMe.txt).
I have taken the original source code and added automatic detection of the
correct bindings file and support for non-US keyboard layouts.
## Automatic Bindings Detection
Elite creates a file `StartPreset.start` in the Bindings directory that contains
the name of the currently active profile. The plugin now reads that file and
loads the correct profile automatically.
Should the file for some reason a) not exist, b) be empty or c) contain an
invalid preset name the old default is used: the most recently changed `.binds`
file.
You can still manually provide a bindings file to use instead by setting it as
the plugin context, as before.
## Support for non-US Keyboard Layouts
If you are using any non-US layout you might have noticed that some binds dont
work. Elite internally uses keycode values (a number assigned to each key on the
keyboard) for its bindings but for some reason both displays and saves them as
keysyms (the label on the key), according to the UK QWERTY keyboard layout. That
means VoiceAttack cant just send the keysym it reads from a binding, it has to
translate it into the corresponding keycode.
The original plugin contained a `EDMap.txt` file that contains infomration on
that conversion _for the US keyboard layout_. If you are using any other layout
that information will be incorrect for any symbols that are on a different key
than they are on the US layout.
I have added the option to use maps for other keyboard layouts. In order to do
so you will have to set a text variable in VoiceAttack called `bindED.layout` to
the layout you want to use before invoking the plugin. If the variable is not
set it will defaut to “en-us”, leaving the original behaviour intact.
I have included a map file for [Neo2](https://neo-layout.org)
(`EDMap-de-neo2.txt`) which is the layout that I am using personally. If you are
on a different layout, you will have to create a corresponding map file yourself
or prod me to add it. E.g. for the french AZERTY it would be `EDMap-fr-fr.text`
and set `bindED.layout` to “fr-fr”. For US Dvorak, `EDmap-en-us-dvorak` and
“en-us-dvorak”. You can see where this is going.
For more information on [creating new supported keyboard layouts see the
# bindED
This VoiceAttack plugin reads keybindings in Elite:Dangerous and stores them as
VoiceAttack variables. It has originally been written by Gary (the developer of
VoiceAttack) [and published on the VoiceAttack
forums](https://forum.voiceattack.com/smf/index.php?topic=564.0).
You can find the [original README here](ReadMe.txt).
I have taken the original source code and added automatic detection of the
correct bindings file and support for non-US keyboard layouts.
## Automatic Bindings Detection
Elite creates a file `StartPreset.start` in the Bindings directory that contains
the name of the currently active profile. The plugin now reads that file and
loads the correct profile automatically.
Should the file for some reason a) not exist, b) be empty or c) contain an
invalid preset name the old default is used: the most recently changed `.binds`
file.
You can still manually provide a bindings file to use instead by setting it as
the plugin context, as before.
## Support for non-US Keyboard Layouts
If you are using any non-US layout you might have noticed that some binds dont
work. Elite internally uses keycode values (a number assigned to each key on the
keyboard) for its bindings but for some reason both displays and saves them as
keysyms (the label on the key), according to the UK QWERTY keyboard layout. That
means VoiceAttack cant just send the keysym it reads from a binding, it has to
translate it into the corresponding keycode.
The original plugin contained a `EDMap.txt` file that contains infomration on
that conversion _for the US keyboard layout_. If you are using any other layout
that information will be incorrect for any symbols that are on a different key
than they are on the US layout.
I have added the option to use maps for other keyboard layouts. In order to do
so you will have to set a text variable in VoiceAttack called `bindED.layout` to
the layout you want to use before invoking the plugin. If the variable is not
set it will defaut to “en-us”, leaving the original behaviour intact.
I have included a map file for [Neo2](https://neo-layout.org)
(`EDMap-de-neo2.txt`) which is the layout that I am using personally. If you are
on a different layout, you will have to create a corresponding map file yourself
or prod me to add it. E.g. for the french AZERTY it would be `EDMap-fr-fr.text`
and set `bindED.layout` to “fr-fr”. For US Dvorak, `EDmap-en-us-dvorak` and
“en-us-dvorak”. You can see where this is going.
For more information on [creating new supported keyboard layouts see the
Wiki](https://github.com/alterNERDtive/bindED/wiki/Keyboard-Layouts).

View file

@ -1,27 +1,27 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30517.126
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bindEDplugin", "bindEDplugin.csproj", "{C8AC9134-639D-45D2-B5EF-138E0550E0C9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FC89314B-E504-4D5D-BB48-F1E3E4980A13}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C8AC9134-639D-45D2-B5EF-138E0550E0C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C8AC9134-639D-45D2-B5EF-138E0550E0C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C8AC9134-639D-45D2-B5EF-138E0550E0C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C8AC9134-639D-45D2-B5EF-138E0550E0C9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BBABAD60-B8A8-464D-BDA0-0F30A40E54A6}
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30517.126
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bindEDplugin", "bindEDplugin.csproj", "{C8AC9134-639D-45D2-B5EF-138E0550E0C9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FC89314B-E504-4D5D-BB48-F1E3E4980A13}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C8AC9134-639D-45D2-B5EF-138E0550E0C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C8AC9134-639D-45D2-B5EF-138E0550E0C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C8AC9134-639D-45D2-B5EF-138E0550E0C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C8AC9134-639D-45D2-B5EF-138E0550E0C9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BBABAD60-B8A8-464D-BDA0-0F30A40E54A6}
EndGlobalSection
EndGlobal