Skip to content

Commit 0bb1a6f

Browse files
committed
Исправлено #1226 - не возможность "использования" клавишы пробела при использовании IME в Hiragana (あ) режиме.
1 parent da4b7f7 commit 0bb1a6f

4 files changed

Lines changed: 19 additions & 2 deletions

File tree

src/apps/mplayerc/AppSettings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ void CAppSettings::LoadSettings(bool bForce/* = false*/)
12041204
for (size_t i = 0; i < Accel.size(); i++) {
12051205
Accel[i] = wmcmds[i];
12061206
}
1207-
hAccel = CreateAcceleratorTableW(Accel.data(), Accel.size());
1207+
hAccel = HandlerForCreateAcceleratorTable(Accel);
12081208

12091209
profile.ReadString(IDS_R_SETTINGS, IDS_RS_WINLIRCADDR, strWinLircAddr);
12101210
profile.ReadBool(IDS_R_SETTINGS, IDS_RS_WINLIRC, bWinLirc);

src/apps/mplayerc/Misc.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,20 @@ WORD AssignedKeyToCmd(UINT keyValue)
395395
return 0;
396396
}
397397

398+
HACCEL HandlerForCreateAcceleratorTable(std::vector<ACCEL>& Accel)
399+
{
400+
for (const auto& accel : Accel) {
401+
if (accel.key == VK_SPACE) {
402+
auto accelCopy = accel;
403+
accelCopy.key = VK_PROCESSKEY;
404+
Accel.emplace_back(accelCopy);
405+
break;
406+
}
407+
}
408+
409+
return CreateAcceleratorTableW(Accel.data(), Accel.size());
410+
}
411+
398412
WORD AssignedMouseToCmd(UINT mouseValue, UINT nFlags)
399413
{
400414
CAppSettings& s = AfxGetAppSettings();

src/apps/mplayerc/Misc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ void ConvertLongPath(CStringW& path);
3636

3737
WORD AssignedKeyToCmd(UINT keyValue);
3838

39+
HACCEL HandlerForCreateAcceleratorTable(std::vector<ACCEL>& Accel);
40+
3941
enum :UINT {
4042
MOUSE_CLICK_LEFT = 1,
4143
MOUSE_CLICK_LEFT_DBL,

src/apps/mplayerc/PPageAccelTbl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#include "stdafx.h"
2323
#include "PPageAccelTbl.h"
24+
#include "Misc.h"
2425

2526
//#define MASK_NUMBER 0xFFF
2627
#define DUP_KEY (1<<12)
@@ -632,7 +633,7 @@ BOOL CPPageAccelTbl::OnApply()
632633
if (s.hAccel) {
633634
DestroyAcceleratorTable(s.hAccel);
634635
}
635-
s.hAccel = CreateAcceleratorTableW(Accel.data(), Accel.size());
636+
s.hAccel = HandlerForCreateAcceleratorTable(Accel);
636637

637638
GetParentFrame()->m_hAccelTable = s.hAccel;
638639

0 commit comments

Comments
 (0)