1
0
mirror of https://github.com/Luzifer/past3.git synced 2024-09-19 08:52:59 +00:00

Bind ctrl+s / ctrl+n to buttons

This commit is contained in:
Knut Ahlers 2017-01-26 09:07:06 +01:00
parent 4321dd05b9
commit a498c9fc04
Signed by: luzifer
GPG Key ID: DC2729FDD34BE99E

View File

@ -47,6 +47,17 @@ $ ->
if $(this).data('file') == filename
$(this).addClass 'active'
$(window).bind 'keydown', (e) ->
if (e.metaKey or e.ctrlKey) and e.keyCode == 83 # cmd+s / ctrl+s
$('#saveFile').trigger 'click'
e.preventDefault()
return false
if (e.metaKey or e.ctrlKey) and e.keyCode == 78 # cmd+n / ctrl+n
$('#newFile').trigger 'click'
e.preventDefault()
return false
signinCallback = (authResult) ->
if authResult.Zi.id_token
getAWSCredentials authResult.Zi.id_token