diff options
Diffstat (limited to 'far2l/src/console')
-rw-r--r-- | far2l/src/console/keyboard.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/far2l/src/console/keyboard.cpp b/far2l/src/console/keyboard.cpp index 537a7aa8..4e6c251e 100644 --- a/far2l/src/console/keyboard.cpp +++ b/far2l/src/console/keyboard.cpp @@ -59,6 +59,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "constitle.hpp" #include "console.hpp" #include "palette.hpp" +#include "xlat.hpp" /* start Глобальные переменные */ @@ -387,10 +388,7 @@ bool KeyToKeyLayoutCompare(int Key, int CompareKey) // Key = KeyToVKey[Key&0xFFFF]&0xFF; // CompareKey = KeyToVKey[CompareKey&0xFFFF]&0xFF; - if (Key && Key == CompareKey) - return true; - - return false; + return (Key && (Key == CompareKey || Xlator(0).Transcode(Key) == CompareKey)); } //Должно вернуть клавишный Eng эквивалент Key @@ -398,7 +396,10 @@ int KeyToKeyLayout(int Key) { _KEYMACRO(CleverSysLog Clev(L"KeyToKeyLayout()")); _KEYMACRO(SysLog(L"Param: Key=%08X",Key)); -return Key; + if (uint32_t(Key) > 0x7f) { + return Xlator(0).Transcode(Key); + } + return Key; /* int VK = KeyToVKey[Key&0xFFFF]; |