mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
bi directional clipboard handling over WS.
This commit is contained in:
parent
968082d7b4
commit
d87c78ba50
@ -37,6 +37,7 @@
|
|||||||
@updateKeyboardModifiers="updateKeyboardModifiers($event)"
|
@updateKeyboardModifiers="updateKeyboardModifiers($event)"
|
||||||
@uploadDrop="uploadDrop($event)"
|
@uploadDrop="uploadDrop($event)"
|
||||||
@onAction="control.emit('overlay.' + $event.action, $event.target)"
|
@onAction="control.emit('overlay.' + $event.action, $event.target)"
|
||||||
|
@clipboard="control.paste($event)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
font-size: 0;
|
font-size: 1px; /* chrome would not paste text if 0px */
|
||||||
outline: 0;
|
outline: 0;
|
||||||
border: 0;
|
border: 0;
|
||||||
color: transparent;
|
color: transparent;
|
||||||
@ -227,8 +227,10 @@
|
|||||||
return x
|
return x
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Custom clipboard sharing logic.
|
onInput(e: InputEvent) {
|
||||||
onInput() {}
|
this.$emit('clipboard', this._textarea.value)
|
||||||
|
this._textarea.value = ''
|
||||||
|
}
|
||||||
|
|
||||||
onWheel(e: WheelEvent) {
|
onWheel(e: WheelEvent) {
|
||||||
if (!this.isControling) {
|
if (!this.isControling) {
|
||||||
|
@ -1427,9 +1427,9 @@ Guacamole.Keyboard = function Keyboard(element) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Automatically type text entered into the wrapped field
|
// Automatically type text entered into the wrapped field
|
||||||
element.addEventListener("input", handleInput, false);
|
//20220428: NEKO: Removed because of clipboard handling.
|
||||||
element.addEventListener("compositionend", handleComposition, false);
|
//element.addEventListener("input", handleInput, false);
|
||||||
|
//element.addEventListener("compositionend", handleComposition, false);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Listen to given element, if any
|
// Listen to given element, if any
|
||||||
|
Loading…
Reference in New Issue
Block a user