Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jensen
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Skye Yu
jensen
Commits
90957233
Commit
90957233
authored
Dec 13, 2024
by
Skye Yu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'main' of
http://gitlab.sugrsugr.com/skye/jensen
into useWorker
parents
dffea6f6
1cb7b3e6
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
38 deletions
+58
-38
jensen.js
src/utils/jensen.js
+6
-4
utils.js
src/utils/utils.js
+52
-34
No files found.
src/utils/jensen.js
View file @
90957233
...
@@ -984,14 +984,16 @@ Jensen.prototype.sendScheduleInfo = function (infos) {
...
@@ -984,14 +984,16 @@ Jensen.prototype.sendScheduleInfo = function (infos) {
if
(
shortcutKeys
[
info
.
platform
]
&&
shortcutKeys
[
info
.
platform
][
info
.
os
])
{
if
(
shortcutKeys
[
info
.
platform
]
&&
shortcutKeys
[
info
.
platform
][
info
.
os
])
{
codes
=
shortcutKeys
[
info
.
platform
][
info
.
os
];
codes
=
shortcutKeys
[
info
.
platform
][
info
.
os
];
}
}
let
startDate
=
new
Array
(
7
).
fill
(
0
);
let
startDate
=
new
Array
(
8
).
fill
(
0
);
let
endDate
=
new
Array
(
7
).
fill
(
0
);
let
endDate
=
new
Array
(
8
).
fill
(
0
);
if
(
info
.
startDate
&&
info
.
endDate
)
{
if
(
info
.
startDate
&&
info
.
endDate
)
{
startDate
=
sliceTime
(
formatTime
(
info
.
startDate
));
startDate
=
sliceTime
(
formatTime
(
info
.
startDate
));
endDate
=
sliceTime
(
formatTime
(
info
.
endDate
));
endDate
=
sliceTime
(
formatTime
(
info
.
endDate
));
startDate
.
push
(
0x00
);
endDate
.
push
(
0x00
);
}
}
const
reserved
=
0x00
;
// 预留
const
reserved
=
[
0x00
,
0x00
]
;
// 预留
bodys
=
bodys
.
concat
([...
startDate
,
...
endDate
,
reserved
,
...
codes
]);
bodys
=
bodys
.
concat
([...
startDate
,
...
endDate
,
...
reserved
,
...
codes
]);
}
}
console
.
log
(
'send schedule info'
,
infos
,
bodys
);
console
.
log
(
'send schedule info'
,
infos
,
bodys
);
return
this
.
send
(
new
Command
(
SCHEDULE_INFO
).
body
(
bodys
));
return
this
.
send
(
new
Command
(
SCHEDULE_INFO
).
body
(
bodys
));
...
...
src/utils/utils.js
View file @
90957233
...
@@ -174,7 +174,7 @@ const enterKeyCode = (answer = 0, hangup = 0, reject = 0, micMute = 0) => {
...
@@ -174,7 +174,7 @@ const enterKeyCode = (answer = 0, hangup = 0, reject = 0, micMute = 0) => {
if
(
hangup
)
code
|=
0x01
<<
1
;
if
(
hangup
)
code
|=
0x01
<<
1
;
if
(
reject
)
code
|=
0x01
<<
2
;
if
(
reject
)
code
|=
0x01
<<
2
;
if
(
micMute
)
code
|=
0x01
<<
3
;
if
(
micMute
)
code
|=
0x01
<<
3
;
return
code
;
return
[
0x00
,
code
]
;
};
};
const
emptyCodes
=
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
];
const
emptyCodes
=
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
];
...
@@ -182,130 +182,148 @@ const emptyCodes = [0, 0, 0, 0, 0, 0, 0, 0];
...
@@ -182,130 +182,148 @@ const emptyCodes = [0, 0, 0, 0, 0, 0, 0, 0];
export
const
shortcutKeys
=
{
export
const
shortcutKeys
=
{
zoom
:
{
zoom
:
{
Windows
:
[
Windows
:
[
enterKeyCode
(
0
,
1
),
...
enterKeyCode
(
0
,
1
),
...
HotKeyBuilder
.
build
(
0x04
,
0x01
),
...
HotKeyBuilder
.
build
(
0x04
,
0x01
),
...
HotKeyBuilder
.
withAlt
().
withKey
(
'Q'
).
build
(),
...
HotKeyBuilder
.
withAlt
().
withKey
(
'Q'
).
build
(),
...
HotKeyBuilder
.
build
(
0x04
,
0x10
),
...
HotKeyBuilder
.
build
(
0x04
,
0x10
),
...
HotKeyBuilder
.
withAlt
().
withKey
(
'A'
).
build
()
...
HotKeyBuilder
.
withAlt
().
withKey
(
'A'
).
build
()
],
],
Mac
:
[
Mac
:
[
enterKeyCode
(
0
,
1
),
...
enterKeyCode
(
0
,
1
),
...
HotKeyBuilder
.
build
(
0x04
,
0x01
),
...
HotKeyBuilder
.
build
(
0x04
,
0x01
),
...
HotKeyBuilder
.
withGuiKey
().
withKey
(
'W'
).
build
(),
...
HotKeyBuilder
.
withGuiKey
().
withKey
(
'W'
).
build
(),
...
HotKeyBuilder
.
build
(
0x04
,
0x10
),
...
HotKeyBuilder
.
build
(
0x04
,
0x10
),
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'A'
).
build
()
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'A'
).
build
()
],
],
Linux
:
[
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
]
Linux
:
[
...
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
]
},
},
teams
:
{
teams
:
{
Windows
:
[
Windows
:
[
enterKeyCode
(),
...
enterKeyCode
(),
...
HotKeyBuilder
.
withControl
().
withShift
().
withKey
(
'A'
).
build
(),
...
HotKeyBuilder
.
withControl
().
withShift
().
withKey
(
'A'
).
build
(),
...
HotKeyBuilder
.
withControl
().
withShift
().
withKey
(
'H'
).
build
(),
...
HotKeyBuilder
.
withControl
().
withShift
().
withKey
(
'H'
).
build
(),
...
HotKeyBuilder
.
withControl
().
withShift
().
withKey
(
'D'
).
build
(),
...
HotKeyBuilder
.
withControl
().
withShift
().
withKey
(
'D'
).
build
(),
...
HotKeyBuilder
.
withControl
().
withShift
().
withKey
(
'M'
).
build
()
...
HotKeyBuilder
.
withControl
().
withShift
().
withKey
(
'M'
).
build
()
],
],
Mac
:
[
Mac
:
[
enterKeyCode
(),
...
enterKeyCode
(),
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'A'
).
build
(),
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'A'
).
build
(),
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'H'
).
build
(),
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'H'
).
build
(),
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'D'
).
build
(),
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'D'
).
build
(),
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'M'
).
build
()
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'M'
).
build
()
],
],
Linux
:
[
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
]
Linux
:
[
...
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
]
},
},
'google-meeting'
:
{
'google-meeting'
:
{
Windows
:
[
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
HotKeyBuilder
.
withControl
().
withKey
(
'D'
).
build
()],
Windows
:
[
...
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
HotKeyBuilder
.
withControl
().
withKey
(
'D'
).
build
()],
Mac
:
[
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
HotKeyBuilder
.
withGuiKey
().
withKey
(
'D'
).
build
()],
Mac
:
[
...
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
HotKeyBuilder
.
withGuiKey
().
withKey
(
'D'
).
build
()],
Linux
:
[
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
]
Linux
:
[
...
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
]
},
},
webex
:
{
webex
:
{
Windows
:
[
Windows
:
[
enterKeyCode
(),
...
enterKeyCode
(),
...
HotKeyBuilder
.
withControl
().
withShift
().
withKey
(
'C'
).
build
(),
...
HotKeyBuilder
.
withControl
().
withShift
().
withKey
(
'C'
).
build
(),
...
HotKeyBuilder
.
withControl
().
withKey
(
'L'
).
build
(),
...
HotKeyBuilder
.
withControl
().
withKey
(
'L'
).
build
(),
...
HotKeyBuilder
.
withControl
().
withKey
(
'D'
).
build
(),
...
HotKeyBuilder
.
withControl
().
withKey
(
'D'
).
build
(),
...
HotKeyBuilder
.
withControl
().
withKey
(
'M'
).
build
()
...
HotKeyBuilder
.
withControl
().
withKey
(
'M'
).
build
()
],
],
Mac
:
[
Mac
:
[
enterKeyCode
(),
...
enterKeyCode
(),
...
HotKeyBuilder
.
withControl
().
withShift
().
withKey
(
'C'
).
build
(),
...
HotKeyBuilder
.
withControl
().
withShift
().
withKey
(
'C'
).
build
(),
...
HotKeyBuilder
.
withGuiKey
().
withKey
(
'L'
).
build
(),
...
HotKeyBuilder
.
withGuiKey
().
withKey
(
'L'
).
build
(),
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'D'
).
build
(),
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'D'
).
build
(),
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'M'
).
build
()
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'M'
).
build
()
],
],
Linux
:
[
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
]
Linux
:
[
...
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
]
},
},
feishu
:
{
feishu
:
{
Windows
:
[
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
HotKeyBuilder
.
withControl
().
withShift
().
withKey
(
'D'
).
build
()],
Windows
:
[
Mac
:
[
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'D'
).
build
()],
...
enterKeyCode
(),
Linux
:
[
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
]
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
HotKeyBuilder
.
withControl
().
withShift
().
withKey
(
'D'
).
build
()
],
Mac
:
[...
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'D'
).
build
()],
Linux
:
[...
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
]
},
},
lark
:
{
lark
:
{
Windows
:
[
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
HotKeyBuilder
.
withControl
().
withShift
().
withKey
(
'D'
).
build
()],
Windows
:
[
Mac
:
[
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'D'
).
build
()],
...
enterKeyCode
(),
Linux
:
[
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
]
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
HotKeyBuilder
.
withControl
().
withShift
().
withKey
(
'D'
).
build
()
],
Mac
:
[...
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'D'
).
build
()],
Linux
:
[...
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
]
},
},
weChat
:
{
weChat
:
{
Windows
:
[
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
],
Windows
:
[
...
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
],
Mac
:
[
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
],
Mac
:
[
...
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
],
Linux
:
[
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
]
Linux
:
[
...
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
]
},
},
line
:
{
line
:
{
Windows
:
[
Windows
:
[
enterKeyCode
(
0
,
1
,
1
),
...
enterKeyCode
(
0
,
1
,
1
),
...
emptyCodes
,
...
emptyCodes
,
...
HotKeyBuilder
.
withKey
(
'ESCAPE'
).
build
(),
...
HotKeyBuilder
.
withKey
(
'ESCAPE'
).
build
(),
...
HotKeyBuilder
.
withKey
(
'ESCAPE'
).
build
(),
...
HotKeyBuilder
.
withKey
(
'ESCAPE'
).
build
(),
...
HotKeyBuilder
.
withControl
().
withShift
().
withKey
(
'A'
).
build
()
...
HotKeyBuilder
.
withControl
().
withShift
().
withKey
(
'A'
).
build
()
],
],
Mac
:
[
Mac
:
[
enterKeyCode
(
0
,
1
,
1
),
...
enterKeyCode
(
0
,
1
,
1
),
...
emptyCodes
,
...
emptyCodes
,
...
HotKeyBuilder
.
withKey
(
'ESCAPE'
).
build
(),
...
HotKeyBuilder
.
withKey
(
'ESCAPE'
).
build
(),
...
HotKeyBuilder
.
withKey
(
'ESCAPE'
).
build
(),
...
HotKeyBuilder
.
withKey
(
'ESCAPE'
).
build
(),
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'A'
).
build
()
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'A'
).
build
()
],
],
Linux
:
[
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
]
Linux
:
[
...
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
]
},
},
'whats-app'
:
{
'whats-app'
:
{
Windows
:
[
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
],
Windows
:
[
...
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
],
Mac
:
[
Mac
:
[
enterKeyCode
(),
...
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
HotKeyBuilder
.
withGuiKey
().
withKey
(
'W'
).
build
(),
...
HotKeyBuilder
.
withGuiKey
().
withKey
(
'W'
).
build
(),
...
HotKeyBuilder
.
withGuiKey
().
withKey
(
'W'
).
build
(),
...
HotKeyBuilder
.
withGuiKey
().
withKey
(
'W'
).
build
(),
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'M'
).
build
()
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'M'
).
build
()
],
],
Linux
:
[
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
]
Linux
:
[
...
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
]
},
},
slack
:
{
slack
:
{
Windows
:
[
Windows
:
[
enterKeyCode
(),
...
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
HotKeyBuilder
.
withControl
().
withShift
().
withKey
(
'SPACE'
).
build
()
...
HotKeyBuilder
.
withControl
().
withShift
().
withKey
(
'SPACE'
).
build
()
],
],
Mac
:
[
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'SPACE'
).
build
()],
Mac
:
[
Linux
:
[
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
]
...
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'SPACE'
).
build
()
],
Linux
:
[...
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
]
},
},
discord
:
{
discord
:
{
Windows
:
[
Windows
:
[
enterKeyCode
(),
...
enterKeyCode
(),
HotKeyBuilder
.
withControl
().
withKey
(
'ENTER'
).
build
(),
HotKeyBuilder
.
withControl
().
withKey
(
'ENTER'
).
build
(),
...
emptyCodes
,
...
emptyCodes
,
...
HotKeyBuilder
.
withKey
(
'ESCAPE'
).
build
(),
...
HotKeyBuilder
.
withKey
(
'ESCAPE'
).
build
(),
...
HotKeyBuilder
.
withControl
().
withShift
().
withKey
(
'M'
).
build
()
...
HotKeyBuilder
.
withControl
().
withShift
().
withKey
(
'M'
).
build
()
],
],
Mac
:
[
Mac
:
[
enterKeyCode
(),
...
enterKeyCode
(),
...
HotKeyBuilder
.
withGuiKey
().
withKey
(
'ENTER'
).
build
(),
...
HotKeyBuilder
.
withGuiKey
().
withKey
(
'ENTER'
).
build
(),
...
emptyCodes
,
...
emptyCodes
,
...
HotKeyBuilder
.
withGuiKey
().
withKey
(
'ESCAPE'
).
build
(),
...
HotKeyBuilder
.
withGuiKey
().
withKey
(
'ESCAPE'
).
build
(),
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'M'
).
build
()
...
HotKeyBuilder
.
withGuiKey
().
withShift
().
withKey
(
'M'
).
build
()
],
],
Linux
:
[
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
]
Linux
:
[
...
enterKeyCode
(),
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
,
...
emptyCodes
]
}
}
};
};
...
...
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