Treat keystroke actions as none actions when no scancode, modifiers and long press action is specified.
This commit is contained in:
@@ -149,7 +149,10 @@ export class KeystrokeAction extends KeyAction {
|
|||||||
|
|
||||||
const TYPE_OFFSET = flags + (this.type << KEYSTROKE_ACTION_FLAG_LENGTH);
|
const TYPE_OFFSET = flags + (this.type << KEYSTROKE_ACTION_FLAG_LENGTH);
|
||||||
|
|
||||||
buffer.writeUInt8(KeyActionId.KeystrokeAction + TYPE_OFFSET);
|
// A keystroke action without scancode, modifiers, and long press
|
||||||
|
// action is just like a none action, so they overlap on purpose.
|
||||||
|
buffer.writeUInt8(KeyActionId.NoneAction + TYPE_OFFSET);
|
||||||
|
|
||||||
for (let i = 0; i < toWrite.length; ++i) {
|
for (let i = 0; i < toWrite.length; ++i) {
|
||||||
if (toWrite[i].long) {
|
if (toWrite[i].long) {
|
||||||
buffer.writeUInt16(toWrite[i].data);
|
buffer.writeUInt16(toWrite[i].data);
|
||||||
|
|||||||
Reference in New Issue
Block a user