Browse Source

check current modifiers when pressing enter button on custom key strokes

ScottBrogden 9 years ago
parent
commit
8466731455
1 changed files with 4 additions and 2 deletions
  1. 4 2
      QuickPasteKeyboard.cpp

+ 4 - 2
QuickPasteKeyboard.cpp

@@ -732,14 +732,16 @@ BOOL CQuickPasteKeyboard::OnCommand(WPARAM wParam, LPARAM lParam)
 void CQuickPasteKeyboard::OnBnClickedButtonEnter()
 {
 	DWORD hk = m_hotKey1.GetHotKey();
-	m_hotKey1.SetHotKey(VK_RETURN, (HIBYTE((DWORD)hk)));
+	BYTE currentModifiers = CAccels::GetKeyStateModifiers();
+	m_hotKey1.SetHotKey(VK_RETURN, currentModifiers);
 }
 
 
 void CQuickPasteKeyboard::OnBnClickedButtonEnter2()
 {
 	DWORD hk = m_hotKey2.GetHotKey();
-	m_hotKey2.SetHotKey(VK_RETURN, (HIBYTE((DWORD)hk)));
+	BYTE currentModifiers = CAccels::GetKeyStateModifiers();
+	m_hotKey2.SetHotKey(VK_RETURN, currentModifiers);
 }