mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Allow compile to be triggered with Ctrl/Cmd-s when Caps Lock is enabled (#14547)
GitOrigin-RevId: f78bd433e6862a49f353e3f994c90024a06e2b3f
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user