Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kityminder-core
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
吴志俊
kityminder-core
Commits
698ab9ed
Commit
698ab9ed
authored
Mar 22, 2014
by
campaign
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加保存快捷键
parent
7105d0f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
social.js
social/social.js
+20
-1
keymap.js
src/core/keymap.js
+3
-1
No files found.
social/social.js
View file @
698ab9ed
...
...
@@ -386,4 +386,23 @@ $( function () {
}
window
.
km
.
on
(
'contentchange'
,
checkAutoSave
);
}
);
\ No newline at end of file
//添加快捷键
$
(
document
.
body
).
keydown
(
function
(
e
){
var
keyCode
=
e
.
keyCode
||
e
.
which
;
//添加快捷键
if
((
e
.
ctrlKey
||
e
.
metaKey
)){
switch
(
keyCode
){
//保存
case
KM
.
keymap
.
s
:
saveThisFile
();
e
.
preventDefault
();
break
;
}
}
})
}
);
src/core/keymap.js
View file @
698ab9ed
...
...
@@ -40,5 +40,7 @@ var keymap = KityMinder.keymap = {
'y'
:
89
,
//粘贴
'v'
:
86
,
'x'
:
88
'x'
:
88
,
's'
:
83
};
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment