通过鳄梨调味酱js会话解锁Windows(Ctrl+ Alt+ del Combo)

发布于 2025-02-08 11:41:05 字数 178 浏览 1 评论 0 原文

我使用 gacamole-common-js 与React项目中的VM进行交互。

要解锁Windows VM,我必须发送CTRL+Alt+Del Combo才能输入密码。

我需要诸如VirtualBox的 Insert Ctrl+Alt+Del 按钮之类的东西。

I use gacamole-common-js to interact with VMs in a React project.

To unlock Windows VMs I have to send the Ctrl+Alt+Del combo to be able to enter my password.

I need something like Virtualbox's Insert Ctrl+Alt+Del button.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

薄情伤 2025-02-15 11:41:05

这是我的(react)代码:

const handleUnlockWindows = () => {
        guacRef.current.sendKeyEvent(1, 0xFFE3); // Ctrl
        guacRef.current.sendKeyEvent(1, 0xFFE9); // Alt
        guacRef.current.sendKeyEvent(1, 0xFFFF); // Delete
    };

guacref 是我的guacamole.client对象。

Keysyms代码来自

SendKeyEvent函数需要两个参数。第一个是布尔值,指示是否按下键(1 =按下; 0 =释放)。第二个是要发送的密钥。

Here is my (React) code :

const handleUnlockWindows = () => {
        guacRef.current.sendKeyEvent(1, 0xFFE3); // Ctrl
        guacRef.current.sendKeyEvent(1, 0xFFE9); // Alt
        guacRef.current.sendKeyEvent(1, 0xFFFF); // Delete
    };

guacRef is my Guacamole.Client object.

The keysyms code are from the Guacamole source code.

The sendKeyEvent function takes two arguments. The first one is a boolean indicating if the key is pressed (1 = pressed; 0 = released). The second one is the keysym to be sent.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文