Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/elfmz/far2l.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelfmz <fenix1905@tut.by>2022-01-23 21:47:57 +0300
committerelfmz <fenix1905@tut.by>2022-01-23 21:51:12 +0300
commit027016eb33e9adeefa3eb20767c09d326f08f0f4 (patch)
treeddcf6f62dbede4b8ae29ff7e39aafd1df7a4af03 /far2l/src/console
parenta0b3a3cd77406f2ee4a221c282af8e4647412372 (diff)
Add <Input settings> menu to configure xlat and some other stuff
Diffstat (limited to 'far2l/src/console')
-rw-r--r--far2l/src/console/keyboard.cpp11
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];