-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Python keyboard
module is incompatible with macOS Ventura
#8
Comments
这个脚本使用的是stream模式,你要确保你的代理支持stream。 |
可以尝试在 Terminal 中运行 可能是因为 Python 的 keyboard 包太久没有更新,不兼容新版本的 macOS。 |
终端中运行确实不能正确打印 “test”。应该是这个原因了。我的系统是macOS Ventura 13.1; |
@zhuiyue132 谢谢! 能否帮忙尝试下 import subprocess
applescript = """
tell application "System Events" to keystroke "test"
"""
subprocess.call(['osascript', '-e', applescript]) 能否在 Ventura 下运行。 会尽快修复。 |
|
@zhuiyue132 好的,会尽快修复。 |
keyboard
module is incompatible with macOS Ventura
这个方案不支持中文。 |
@zhuiyue132 谢谢! 在 macOS Monterey 使用 >>> js 冒泡排序带中文注释
function bubbleSort(arr) {
const len = arr.length; // 获取数组长度,用于控制循环次数
for (let i = 0; i < len - 1; i++) { // 外层循环控制排序次数,每次循环可以确保一个元素位置正确
for (let j = 0; j < len - 1 - i; j++) { // 内层循环用于比较相邻的两个元素的大小,并交换位置
if (arr[j] > arr[j + 1]) { // 如果当前元素比下一位元素大,则交换位置
const temp = arr[j]; // 用临时变量存储当前元素的值
arr[j] = arr[j + 1]; // 将下一位元素的值赋给当前元素
arr[j + 1] = temp; // 将临时变量中存储的当前元素的值赋给下一位元素
}
}
}
return arr; // 返回排序后的数组
}
// 示例用法:
const arr = [3, 5, 1, 2, 4];
console.log(bubbleSort(arr)); // 输出 [1, 2, 3, 4, 5]
[Generated by ChatGPT, 2023-04-25 15:48:51] 除了 pynput 和 PyAutoGUI 外,还有一个可能的解决方案是,用 boppreh/keyboard#587 替换默认的 从 GitHub Repository 安装 Python 包的命令如下:
|
|
我也 Apple 芯片。URL 似乎不太对?我的输出前几行是这样的。
|
麻烦问下,这个大概多久能支持Ventura系统呀 |
将python升级到Python 3.11.5后,可以在Ventura上正常使用。 |
run anywhere也能正常调起Alfred,gpt关键词也没问题。
但就是没响应;
实测api-key和代理接口没问题。
The text was updated successfully, but these errors were encountered: