mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Allow compile to be triggered with Ctrl/Cmd-s when Caps Lock is enabled (#14547)
GitOrigin-RevId: f78bd433e6862a49f353e3f994c90024a06e2b3f
This commit is contained in:
parent
5aeb461551
commit
e320473d05
1 changed files with 10 additions and 0 deletions
|
@ -12,11 +12,21 @@ export const startCompileKeypress = event => {
|
|||
if (event.key === 's' || event.key === 'Enter' || event.key === '.') {
|
||||
return true
|
||||
}
|
||||
|
||||
// Ctrl+s with Caps-Lock on
|
||||
if (event.key === 'S' && !event.shiftKey) {
|
||||
return true
|
||||
}
|
||||
} else if (event.metaKey) {
|
||||
// Cmd+s / Cmd+Enter
|
||||
if (event.key === 's' || event.key === 'Enter') {
|
||||
return true
|
||||
}
|
||||
|
||||
// Cmd+s with Caps-Lock on
|
||||
if (event.key === 'S' && !event.shiftKey) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue