Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debia
sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list

# 安装系统依赖 (手动列出 Chromium 所需依赖,适配 Debian)
# 新增: fonts-noto-cjk fonts-wqy-zenhei 用于支持中文显示
RUN apt-get update && apt-get install -y \
wget \
gnupg \
fonts-liberation \
fonts-noto-cjk \
fonts-wqy-zenhei \
libasound2 \
libatk-bridge2.0-0 \
libatk1.0-0 \
Expand Down
16 changes: 15 additions & 1 deletion static/remote.html
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,21 @@

function handleKeyDown(e) {
if (e.repeat) return;
// 阻止一些常见快捷键,避免影响浏览器

// 检查事件目标是否是输入框
const target = e.target;
const isInput = target.tagName === 'INPUT' || target.tagName === 'TEXTAREA';

// 如果在输入框中,不阻止默认行为(除非是回车键用于发送)
if (isInput) {
// 如果需要,可以在这里处理输入框的快捷键,比如回车提交
if (e.key === 'Enter' && target.id === 'urlInput') {
navigate();
}
return;
}

// 阻止一些常见快捷键,避免影响浏览器,但仅当不在输入框中时
if (['Tab', 'Backspace', 'Delete', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', ' ', 'Enter'].includes(e.key)) {
e.preventDefault();
}
Expand Down