Commits

Stefan Cosma  committed d7737cd

Add more key names

  • Participants
  • Parent commits 93afdd5

Comments (0)

Files changed (3)

File Plugin/ConfigDialog.cpp

 	
 	LoadString(GetApp()->GetInstanceHandle(), IDS_VK_OEM_PERIOD, text, sizeof(text)/sizeof(text[0]));
 	g_KeyNames.insert(std::pair<unsigned int, const string_t>(VK_OEM_PERIOD, string_t(text)));
+
+	LoadString(GetApp()->GetInstanceHandle(), IDS_VK_VOLUME_MUTE, text, sizeof(text)/sizeof(text[0]));
+	g_KeyNames.insert(std::pair<unsigned int, const string_t>(VK_VOLUME_MUTE, string_t(text)));
+
+	LoadString(GetApp()->GetInstanceHandle(), IDS_VK_VOLUME_DOWN, text, sizeof(text)/sizeof(text[0]));
+	g_KeyNames.insert(std::pair<unsigned int, const string_t>(VK_VOLUME_DOWN, string_t(text)));
+
+	LoadString(GetApp()->GetInstanceHandle(), IDS_VK_VOLUME_UP, text, sizeof(text)/sizeof(text[0]));
+	g_KeyNames.insert(std::pair<unsigned int, const string_t>(VK_VOLUME_UP, string_t(text)));
+
+	LoadString(GetApp()->GetInstanceHandle(), IDS_VK_MEDIA_NEXT_TRACK, text, sizeof(text)/sizeof(text[0]));
+	g_KeyNames.insert(std::pair<unsigned int, const string_t>(VK_MEDIA_NEXT_TRACK, string_t(text)));
+
+	LoadString(GetApp()->GetInstanceHandle(), IDS_VK_MEDIA_PREV_TRACK, text, sizeof(text)/sizeof(text[0]));
+	g_KeyNames.insert(std::pair<unsigned int, const string_t>(VK_MEDIA_PREV_TRACK, string_t(text)));
+
+	LoadString(GetApp()->GetInstanceHandle(), IDS_VK_MEDIA_STOP, text, sizeof(text)/sizeof(text[0]));
+	g_KeyNames.insert(std::pair<unsigned int, const string_t>(VK_MEDIA_STOP, string_t(text)));
+
+	LoadString(GetApp()->GetInstanceHandle(), IDS_VK_MEDIA_PLAY_PAUSE, text, sizeof(text)/sizeof(text[0]));
+	g_KeyNames.insert(std::pair<unsigned int, const string_t>(VK_MEDIA_PLAY_PAUSE, string_t(text)));
+
+	// add num pad 0-9
+	LoadString(GetApp()->GetInstanceHandle(), IDS_VK_NUMPADX, text, sizeof(text)/sizeof(text[0]));
+	for (unsigned int i = 0x60; i < 0x6A; i++)
+	{
+		TCHAR keytext[256] = {0};
+		_stprintf_s(keytext, 256, text, i - 0x60);
+		g_KeyNames.insert(std::pair<unsigned int, const string_t>(i, string_t(keytext)));
+	}
 }
 
 string_t BuildKeyCombinationString(KeyCombination kc)

File Plugin/resource.h

 #define IDS_VK_UNKNOWN                  150
 #define IDS_DUPLICATE_ERROR_TEXT        151
 #define IDS_DUPLICATE_ERROR_CAPTION     152
+#define IDS_VK_VOLUME_MUTE              153
+#define IDS_VK_VOLUME_DOWN              154
+#define IDS_VK_VOLUME_UP                155
+#define IDS_VK_MEDIA_NEXT_TRACK         156
+#define IDS_VK_MEDIA_PREV_TRACK         157
+#define IDS_VK_MEDIA_STOP               158
+#define IDS_VK_MEDIA_PLAY_PAUSE         159
+#define IDS_VK_NUMPADX                  160
 #define IDC_APPLY                       1001
 #define IDC_HOTKEYS_LIST                1002
 #define IDC_ACTIONS_COMBO               1003

File Plugin/resource.rc

     IDS_VK_UNKNOWN          "Key %#x"
     IDS_DUPLICATE_ERROR_TEXT "Hotkey already defined"
     IDS_DUPLICATE_ERROR_CAPTION "Duplicate Hotkey"
+    IDS_VK_VOLUME_MUTE      "Mute Key"
+    IDS_VK_VOLUME_DOWN      "Volume Down Key"
+    IDS_VK_VOLUME_UP        "Volume Up Key"
+    IDS_VK_MEDIA_NEXT_TRACK "Next Track Key"
+    IDS_VK_MEDIA_PREV_TRACK "Previous Track Key"
+    IDS_VK_MEDIA_STOP       "Stop Key"
+    IDS_VK_MEDIA_PLAY_PAUSE "Play/Pause Key"
+END
+
+STRINGTABLE
+BEGIN
+    IDS_VK_NUMPADX          "NumPad %u"
 END
 
 #endif    // English (United States) resources