-
Notifications
You must be signed in to change notification settings - Fork 52
Feature/keyboard shortcuts #160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 9 commits
07fe63f
f9cc030
9813dfb
9aa7e78
ab47c1e
d70c329
da42ebb
9c29e96
1cdbfd1
b257545
3615ddc
5dba38f
f5e397d
c1c2743
b0a5938
2973ec8
0c83116
91e50ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from app.dependencies import templates | ||
from fastapi import APIRouter, Request | ||
from starlette.templating import _TemplateResponse | ||
|
||
router = APIRouter() | ||
|
||
|
||
@router.get("/keyboard_shortcuts") | ||
def keyboard_shortcuts(request: Request) -> _TemplateResponse: | ||
return templates.TemplateResponse("keyboard_shortcuts.html", { | ||
"request": request}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import './mousetrap.js' | ||
import './mousetrap_bind_dict.js' | ||
|
||
let key_shortcuts = { | ||
'alt+c+h': function() { window.open('/', '_self'); }, | ||
'alt+c+i': function() { window.open('/invitations/', '_self'); }, | ||
'alt+c+p': function() { window.open('/profile/', '_self'); }, | ||
'alt+c+s': function() { window.open('/search/', '_self'); }, | ||
'alt+c+a': function() { window.open('/agenda/', '_self'); }, | ||
'ctrl+.': function() { window.open('/keyboard_shortcuts/', '_self'); } | ||
|
||
}; | ||
|
||
Mousetrap.bind(key_shortcuts); |
Uh oh!
There was an error while loading. Please reload this page.