File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -1526,10 +1526,23 @@ export class Input {
1526
1526
return ;
1527
1527
}
1528
1528
for ( let i = 0 ; i < text . length ; i ++ ) {
1529
- const keysym = Keysyms . lookup ( text . charCodeAt ( i ) ) ;
1530
- if ( keysym ) {
1531
- this . send ( "kd," + keysym ) ;
1532
- this . send ( "ku," + keysym ) ;
1529
+ const char = text [ i ] ;
1530
+ const isUpperCase = char >= 'A' && char <= 'Z' ;
1531
+ if ( isUpperCase ) {
1532
+ this . send ( "kd," + KeyTable . XK_Shift_L ) ;
1533
+ const lowerChar = char . toLowerCase ( ) ;
1534
+ const letterKeysym = Keysyms . lookup ( lowerChar . charCodeAt ( 0 ) ) ;
1535
+ if ( letterKeysym ) {
1536
+ this . send ( "kd," + letterKeysym ) ;
1537
+ this . send ( "ku," + letterKeysym ) ;
1538
+ }
1539
+ this . send ( "ku," + KeyTable . XK_Shift_L ) ;
1540
+ } else {
1541
+ const keysym = Keysyms . lookup ( char . charCodeAt ( 0 ) ) ;
1542
+ if ( keysym ) {
1543
+ this . send ( "kd," + keysym ) ;
1544
+ this . send ( "ku," + keysym ) ;
1545
+ }
1533
1546
}
1534
1547
}
1535
1548
event . target . value = '' ;
You can’t perform that action at this time.
0 commit comments