On OSX, I frequently use the following standard shortcuts that work across all applications:
ctrl+e for end of line
ctrl+a for beginning of line
ctrl+k to copy from the cursor to the end of the line
ctrl+y to paste copies made with ctrl+k
Of these ctrl+k and ctrl+y do not work which has been somewhat frustrating since this is the only app I use where they do not work . This negatively impacts my user experience .
This is also true at Stack Overflow with the editor – it’s a shared open source component with default keyboard shortcuts.
There are alternative keyboard shortcuts for doing those functions, e.g. end takes you to the end of line, home takes you to the beginning of the line, etc.
当网站覆盖标准快捷键时,这并不能解决问题。苹果并非这些快捷键的发明者,GNU Readline 也使用相同的快捷键。我主要在 Linux 上工作,因此这些快捷键在 Linux 上同样有效。我之所以提到 macOS,是因为 Linux 用户的问题通常被忽视,而这个问题实际上同时影响了 macOS 和 Linux 用户。
你认为外部 USB 键盘更具可访问性,这只是一种观点。在我看来,将触控板放置在能快速返回主键行的位置更具可访问性。只使用一个键盘(例如当我不在办公桌前、没有外部键盘时)也更具可访问性。因此,对我来说,能够使用笔记本电脑自带的键盘是更具可访问性的选择。话虽如此,我使用 MacBook 的唯一原因是公司提供的;过去我使用的是 ThinkPad,它们的键盘更好。而且这台 MacBook 已经使用了好几年,因此键盘实际上还不错。基于你在稻草人论点中提到的理由,当需要更换这台电脑时,我可能会向其他制造商申请笔记本电脑——但这丝毫无法解决由网站覆盖标准快捷键所造成的可访问性问题。
// ==UserScript==
// @name 反键盘劫持
// @description 防止网页应用捕获并屏蔽重要的键盘快捷键
// @inject-into auto
// @version 1.1
// ==/UserScript==
function antigrab(e) {
if (! e.ctrlKey) {
return;
}
switch (e.keyCode) {
case 65: // A - 跳转到行首
case 69: // E - 跳转到行尾
case 70: // F - 查找
case 87: // W - 关闭窗口
case 84: // T - 打开标签页
case 75: // K - 删除到行尾
case 89: // Y - 粘贴
e.stopImmediatePropagation();
e.stopPropagation();
}
}
(function(){
unsafeWindow.document.addEventListener('keydown', antigrab, true);
})();