diff options
author | nyamatongwe <devnull@localhost> | 2003-04-19 21:41:38 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2003-04-19 21:41:38 +0000 |
commit | 5684e6789635121e65f054962a61a1df7e6b4964 (patch) | |
tree | f3f8043921d05c9b458701b2197c6c48c3933f13 | |
parent | 1805788277237ea895b016637b07a1027f5e28a7 (diff) | |
download | scintilla-mirror-5684e6789635121e65f054962a61a1df7e6b4964.tar.gz |
Added processing of WM_UNICHAR.
-rw-r--r-- | win32/ScintillaWin.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index a49daf61b..c8bf2cf81 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -52,6 +52,11 @@ #define SPI_GETWHEELSCROLLLINES 104 #endif +#ifndef WM_UNICHAR +#define WM_UNICHAR 0x0109 +#define UNICODE_NOCHAR 0xFFFF +#endif + // These undefinitions are required to work around differences between different versions // of the mingw headers, some of which define these twice, in both winuser.h and imm.h. #ifdef __MINGW_H @@ -636,6 +641,20 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam } return 1; + case WM_UNICHAR: + if (wParam == UNICODE_NOCHAR) { + return 1; + } else if (lastKeyDownConsumed) { + return 1; + } else { + if (IsUnicodeMode()) { + AddCharBytes(static_cast<char>(wParam & 0xff)); + return 1; + } else { + return 0; + } + } + case WM_SYSKEYDOWN: case WM_KEYDOWN: { //Platform::DebugPrintf("S keydown %d %x %x %x %x\n",iMessage, wParam, lParam, ::IsKeyDown(VK_SHIFT), ::IsKeyDown(VK_CONTROL)); |