return m_nCommandID[nCommandType][nKey];\r
}\r
\r
-void CData::SetAtIbeamCursorOnly(int nCommandType, int nKey, BOOL bAtIbeamCursorOnly)\r
-{\r
- ASSERT(nCommandType >= 0 || nCommandType < MAX_COMMAND_TYPE);\r
- ASSERT(nKey <= 0 || nKey < MAX_KEY);\r
- m_bAtIbeamCursorOnly[nCommandType][nKey] = bAtIbeamCursorOnly;\r
-}\r
-\r
-BOOL CData::GetAtIbeamCursorOnly(int nCommandType, int nKey)\r
-{\r
- ASSERT(nCommandType >= 0 || nCommandType < MAX_COMMAND_TYPE);\r
- ASSERT(nKey <= 0 || nKey < MAX_KEY);\r
- return m_bAtIbeamCursorOnly[nCommandType][nKey];\r
-}\r
-\r
void CData::ClearAll()\r
{\r
ZeroMemory(m_nCommandID, sizeof(m_nCommandID));\r
int GetKillRingMax();\r
CString GetApplicationTitle();\r
void SetApplicationTitle(LPCTSTR lpszApplicationTitle);\r
-\r
int GetCommandID(int nCommandType, int nKey);\r
void SetCommandID(int nCommandType, int nKey, int nCommandID);\r
- BOOL GetAtIbeamCursorOnly(int nCommandType, int nKey);\r
- void SetAtIbeamCursorOnly(int nCommandType, int nKey, BOOL bAtIbeamCursorOnly);\r
CString GetApplicationName();\r
void SetApplicationName(LPCTSTR lpszApplicationName);\r
CData();\r
int nKey = 0;\r
ReadKeyBind(&nCommandType, &nKey, szKeyBind);\r
m_XkeymacsData[nApplicationID].SetCommandID(nCommandType, nKey, nCommandID);\r
-\r
-// if (nCommandType == CONTROL && nKey == 'D') {\r
-// CUtils::Log("GetProfileInt(at ibeam cursor only): %s, %s", szSubKey, szKeyBind);\r
-// }\r
- const CString szSection = szSubKey.Right(szSubKey.GetLength() - CString(MAKEINTRESOURCE(IDS_REGSUBKEY_DATA)).GetLength() - _tcslen(_T("\\"))) + _T("\\") + szKeyBind;\r
- const BOOL bAtIbeamCursorOnly = AfxGetApp()->GetProfileInt(szSection, CString(MAKEINTRESOURCE(IDS_REG_ENTRY_AT_IBEAM_CURSOR_ONLY)), FALSE);\r
- m_XkeymacsData[nApplicationID].SetAtIbeamCursorOnly(nCommandType, nKey, bAtIbeamCursorOnly);\r
-\r
memset(szKeyBind, 0, sizeof(szKeyBind));\r
dwKeyBind = sizeof(szKeyBind);\r
}\r
break;\r
}\r
m_XkeymacsData[nApplicationID].SetCommandID(nCommandType, nKey, nCommandID);\r
- m_XkeymacsData[nApplicationID].SetAtIbeamCursorOnly(nCommandType, nKey, FALSE);\r
}\r
}\r
}\r
CXkeymacsDll::SetApplicationName(nApplicationID, szApplicationName);\r
CXkeymacsDll::SetWindowText(nApplicationID, m_XkeymacsData[nApplicationID].GetWindowText());\r
CXkeymacsDll::SetCommandID(nApplicationID, CONTROL, 'X', 0);\r
- CXkeymacsDll::SetAtIbeamCursorOnly(nApplicationID, CONTROL, 'X', FALSE);\r
\r
for (int nCommandType = 0; nCommandType < MAX_COMMAND_TYPE; ++nCommandType) {\r
for (int nKey = 0; nKey < MAX_KEY; ++nKey) {\r
const int nCommandID = m_XkeymacsData[nApplicationID].GetCommandID(nCommandType, nKey);\r
CXkeymacsDll::SetCommandID(nApplicationID, nCommandType, nKey, nCommandID);\r
- const BOOL bAtIbeamCursorOnly = m_XkeymacsData[nApplicationID].GetAtIbeamCursorOnly(nCommandType, nKey);\r
- CXkeymacsDll::SetAtIbeamCursorOnly(nApplicationID, nCommandType, nKey, bAtIbeamCursorOnly);\r
if ((nCommandType & CONTROLX) && nCommandID) {\r
CXkeymacsDll::SetCommandID(nApplicationID, CONTROL, 'X', 1); // Commands[1] is C-x\r
- CXkeymacsDll::SetAtIbeamCursorOnly(nApplicationID, CONTROL, 'X', bAtIbeamCursorOnly);\r
}\r
}\r
}\r
CXkeymacsDll::SetFunctionKey(nFunctionID, nApplicationID, nCommandType, nKey);\r
if (nCommandType & CONTROLX) {\r
CXkeymacsDll::SetCommandID(nApplicationID, CONTROL, 'X', 1); // Commands[1] is C-x\r
- const BOOL bAtIbeamCursorOnly = m_XkeymacsData[nApplicationID].GetAtIbeamCursorOnly(nCommandType, nKey);\r
- CXkeymacsDll::SetAtIbeamCursorOnly(nApplicationID, CONTROL, 'X', bAtIbeamCursorOnly);\r
}\r
}\r
}\r
goto DO_NOTHING;\r
}\r
\r
- if (m_Config.bAtIbeamCursorOnly[m_nApplicationID][nCommandType][nKey]) {\r
- CURSORINFO cursorinfo = { sizeof(cursorinfo) };\r
- if (GetCursorInfo(&cursorinfo) && cursorinfo.flags && cursorinfo.hCursor != LoadCursor(NULL, IDC_IBEAM)) {\r
- goto DO_NOTHING;\r
- }\r
- }\r
-\r
m_bRightControl = IsDown(VK_RCONTROL, FALSE);\r
m_bRightAlt = IsDown(VK_RMENU, FALSE);\r
m_bRightShift = IsDown(VK_RSHIFT, FALSE);\r
m_Config.nCommandID[nApplicationID][nCommandType][nKey] = nCommandID;\r
}\r
\r
-void CXkeymacsDll::SetAtIbeamCursorOnly(int nApplicationID, int nCommandType, int nKey, BOOL bAtIbeamCursorOnly)\r
-{\r
- m_Config.bAtIbeamCursorOnly[nApplicationID][nCommandType][nKey] = bAtIbeamCursorOnly;\r
-}\r
-\r
void CXkeymacsDll::SetKillRingMax(int nApplicationID, int nKillRingMax)\r
{\r
m_Config.nKillRingMax[nApplicationID] = nKillRingMax;\r
if (0 <= nApplicationID && nApplicationID < MAX_APP) {\r
ZeroMemory(m_Config.szSpecialApp[nApplicationID], sizeof(m_Config.szSpecialApp[nApplicationID]));\r
ZeroMemory(m_Config.nCommandID[nApplicationID], sizeof(m_Config.nCommandID[nApplicationID]));\r
- ZeroMemory(m_Config.bAtIbeamCursorOnly[nApplicationID], sizeof(m_Config.bAtIbeamCursorOnly[nApplicationID]));\r
m_Config.nKillRingMax[nApplicationID] = 0;\r
m_Config.bUseDialogSetting[nApplicationID] = FALSE;\r
m_Config.nSettingStyle[nApplicationID] = 0;\r
static void Clear(int nApplicationID);\r
static BOOL IsKeyboardHook();\r
static void SetCommandID(int nApplicationID, int nCommandType, int nKey, int nCommandID);\r
- static void SetAtIbeamCursorOnly(int nApplicationID, int nCommandType, int nKey, BOOL bAtIbeamCursorOnly);\r
static void SetApplicationName(int nApplicationID, CString szApplicationName);\r
static void ReleaseHooks();\r
static void SetEnableCUA(int nApplicationID, BOOL bEnableCUA);\r