Page 1 of 1
Map keyboard layouts while selecting drives
Posted: 2012-10-11, 12:43 UTC
by nemadeka
My system is Russian+US English
I have drives C, D and E
In Russian layout it is С, В, and У, and TC does not respond to them, when I press Alt+F1 or Alt+F2
It would be nice to have the keyboard keys mapped for this particular action, for me to avoid switching to US layout and back, or using the arrow keys.
What do you think?
Posted: 2012-10-11, 13:22 UTC
by ghisler(Author)
Yes, could be done - do you have the mapping for all drives for me, so I could put them in a table? If possible, the key codes (as shown in charmap.exe when switched to Windows Cyrillic).
Example:
C -> С, -> 0xD1
D -> В -> 0xC2
E -> У -> 0xD3
etc. (I don't know whether the above is correct or not).
Posted: 2012-10-11, 13:38 UTC
by nemadeka
I made the code using Excel formula, not sure if this is what you said.
------------------------------------------------
A Ф 212
B И 200
C С 209
D В 194
E У 211
F А 192
G П 207
H Р 208
I Ш 216
J О 206
K Л 203
L Д 196
M Ь 220
N Т 210
O Щ 217
P З 199
Q Й 201
R К 202
S Ы 219
T Е 197
U Г 195
V М 204
W Ц 214
X Ч 215
Y Н 205
Z Я 223
a ф 244
b и 232
c с 241
d в 226
e у 243
f а 224
g п 239
h р 240
i ш 248
j о 238
k л 235
l д 228
m ь 252
n т 242
o щ 249
p з 231
q й 233
r к 234
s ы 251
t е 229
u г 227
v м 236
w ц 246
x ч 247
y н 237
z я 255
----------------------------------------
Posted: 2012-10-12, 04:03 UTC
by Gral
Code: Select all
A Ф 0xD4
B И 0xC8
C С 0xD1
D В 0xC2
E У 0xD3
F А 0xC0
G П 0xCF
H Р 0xD0
I Ш 0xD8
J О 0xCE
K Л 0xCB
L Д 0xC4
M Ь 0xDC
N Т 0xD2
O Щ 0xD9
P З 0xC7
Q Й 0xC9
R К 0xCA
S Ы 0xDB
T Е 0xC5
U Г 0xC3
V М 0xCC
W Ц 0xD6
X Ч 0xD7
Y Н 0xCD
Z Я 0xDF
a ф 0xF4
b и 0xE8
c с 0xF1
d в 0xE2
e у 0xF3
f а 0xE0
g п 0xEF
h р 0xF0
i ш 0xF8
j о 0xEE
k л 0xEB
l д 0xE4
m ь 0xFC
n т 0xF2
o щ 0xF9
p з 0xE7
q й 0xE9
r к 0xEA
s ы 0xFB
t е 0xE5
u г 0xE3
v м 0xEC
w ц 0xF6
x ч 0xF7
y н 0xED
z я 0xFF
Posted: 2012-10-12, 05:42 UTC
by MVV
Unfortunately it is a generic problem with multi-layout systems: accelerators don't work when we switch to another layout.
ghisler,
Maybe you can made universal solution instead of using different tables? You can act on
WM_KEYDOWN (
OnKeyDown) and convert scan code to virtual key in English locale using
MapVirtualKeyEx function, so you will get correct result with any layout.
Code: Select all
var lay409: HKL;
procedure xxx.yyyKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
var DriveLetter: Char;
begin
DriveLetter := Chr(MapVirtualKeyEx(Key, 2 (*MAPVK_VK_TO_CHAR*), lay409));
end;
begin
lay409 := LoadKeyboardLayout('00000409', 0);
end.
Posted: 2012-10-14, 12:10 UTC
by MaxX
Great idea! Support! +++
Posted: 2012-10-15, 13:32 UTC
by ghisler(Author)
2MVV
That sounds like an even better idea, I will try that!
Will it work in 'find file'?
Posted: 2012-10-16, 09:11 UTC
by nemadeka
Will it work in 'find file'?
Because now I press Alt+F7, type the file name in Russian, switch to US, press Alt+T, switch to Russian, type the text to look for, switch to US, press Alt+C (Word documents are Unicode).
By the way, the post title is nearly invisile.
Posted: 2012-10-16, 13:08 UTC
by MVV
nemadeka, for such reasons I use numeric shortcut keys in Find Files dialog (I've modified LNG file so I have "Search for, &1", "Find text, &3" etc). But it would be great to get accelerators working in all dialogs. However it is not so easy to change because that logic is not a user-made.
Posted: 2012-10-16, 14:28 UTC
by nemadeka
I am not sure I can understand, and I am not a techincal person.
Is it possible, when TC launches, to look into the keyboard layouts present on the system, and then, when ALT+Something is pressed, to somehow match the "wrong" key (say, West Antarctic layout) with the 'right ' one -- from the US layout? It would be nice.
Word Xp does not have it, by the way. When the layout is US, I have to touch the mouse. Most Russian software has this "mapping" active and [mostly] functional.
Russian still does not work
Posted: 2017-01-21, 11:12 UTC
by nemadeka
MVV wrote:nemadeka, for such reasons I use numeric shortcut keys in Find Files dialog (I've modified LNG file so I have "Search for, &1", "Find text, &3" etc). But it would be great to get accelerators working in all dialogs. However it is not so easy to change because that logic is not a user-made.
With the latest version I keep switching to EN-US for accelerators and RU-RU for Russian search strings or filenames.
A minor PITA, but feels irritating at times - like a pebble in your shoe.
Posted: 2017-01-21, 12:07 UTC
by MVV
I still use numeric accelerators for important find files dialog controls which I use mostly (Alt+3 for text search especially). In other dialogs I don't use accelerators because of layout dependency.