mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-28 05:55:17 -07:00
Improve keyboard code parsing (#13307)
This commit is contained in:
committed by
GitHub
parent
36b0a86c69
commit
b916d79fe2
@@ -405,9 +405,9 @@ function* emitKeys(
|
||||
code += match[1] + match[3];
|
||||
// Defaults to '1' if no modifier exists, resulting in a 0 modifier value
|
||||
modifier = parseInt(match[2] ?? '1', 10) - 1;
|
||||
} else if ((match = /^((\d;)?(\d))?([A-Za-z])$/.exec(cmd))) {
|
||||
code += match[4];
|
||||
modifier = parseInt(match[3] ?? '1', 10) - 1;
|
||||
} else if ((match = /^(\d+)?(?:;(\d+))?([A-Za-z])$/.exec(cmd))) {
|
||||
code += match[3];
|
||||
modifier = parseInt(match[2] ?? match[1] ?? '1', 10) - 1;
|
||||
} else {
|
||||
code += cmd;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user