diff --git a/crates/kiri/src/ui/index.html b/crates/kiri/src/ui/index.html
index f7962aaa..503405cb 100644
--- a/crates/kiri/src/ui/index.html
+++ b/crates/kiri/src/ui/index.html
@@ -112,7 +112,7 @@
.gfind:hover { border-color: color-mix(in srgb, var(--text) 22%, var(--line)); }
.gfind:focus-within { width: 400px; background: var(--panel); border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 22%, transparent); }
.gfind > svg { width: 14px; height: 14px; color: var(--muted); flex: none; }
-.gfind input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; color: var(--text); font: var(--fs) var(--ui-font); outline: none; }
+.gfind input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; color: var(--text); font: var(--fs) var(--ui-font); outline: none; -webkit-user-select: text; user-select: text; }
.gfind input::placeholder { color: var(--faint); }
.gfind kbd { flex: none; height: 18px; padding: 0 6px; border-radius: 5px; display: inline-flex; align-items: center; font: 500 var(--fs-small) var(--ui-font);
color: var(--faint); background: color-mix(in srgb, var(--text) 6%, transparent); transition: opacity .15s; }
@@ -2760,10 +2760,9 @@
Containers
const editable = ev.target.closest?.("input, textarea, [contenteditable]");
if (!editable && !String(getSelection()).trim()) ev.preventDefault();
});
-/* Copy with the keyboard. The window has no Edit menu, which is where the
- Mac gets Copy's key from, so selected text (a log, a row's value) goes to
- the clipboard the way the terminal's does. Text fields and the terminal
- keep their own handling. */
+/* Copy selected page text through the host. Text fields and the terminal keep
+ their own native handling; this covers non-editable selections such as logs
+ and row values. */
document.addEventListener("keydown", (ev) => {
const mod = WIN || LINUX ? ev.ctrlKey && !ev.metaKey : ev.metaKey && !ev.ctrlKey;
if (!mod || ev.altKey || ev.shiftKey || ev.key.toLowerCase() !== "c") return;
diff --git a/crates/kiri/src/ui/lang.rs b/crates/kiri/src/ui/lang.rs
index 56260841..1297418f 100644
--- a/crates/kiri/src/ui/lang.rs
+++ b/crates/kiri/src/ui/lang.rs
@@ -457,8 +457,18 @@ mod tests {
assert!(!m.is_empty(), "lang/{tag}.json is empty");
}
assert_eq!(tr("zh-Hans", "Settings…"), "设置…");
- for (tag, _) in FILES {
- assert_ne!(tr(tag, "Settings…"), "Settings…", "lang/{tag}.json lacks Settings…");
+ for word in [
+ "Settings…",
+ "Undo",
+ "Redo",
+ "Cut",
+ "Copy",
+ "Paste",
+ "Select All",
+ ] {
+ for (tag, _) in FILES {
+ assert_ne!(tr(tag, word), word, "lang/{tag}.json lacks {word}");
+ }
}
assert_eq!(tr("en", "Settings…"), "Settings…");
assert_eq!(tr("zh-Hans", "no such words"), "no such words");
diff --git a/crates/kiri/src/ui/lang/am.json b/crates/kiri/src/ui/lang/am.json
index 51fedd29..8bea44fb 100644
--- a/crates/kiri/src/ui/lang/am.json
+++ b/crates/kiri/src/ui/lang/am.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "የUSB ማሳለፊያ አዲስ ነው፦ ከመሣሪያዎችዎ ጋር እንዴት እንደሚሠራ ይንገሩን",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu አስቀድሞ በዚህ PC ላይ አለ፣ ስለዚህ እሱን መምረጥ ምንም አያወርድም።",
"Undo": "ቀልብስ",
+ "Redo": "ድገም",
+ "Cut": "ቁረጥ",
+ "Select All": "ሁሉንም ምረጥ",
"Undo brings it back": "ቀልብስ መልሶ ያመጣዋል",
"Undo brings them back": "ቀልብስ መልሶ ያመጣቸዋል",
"Unknown": "ያልታወቀ",
diff --git a/crates/kiri/src/ui/lang/ar.json b/crates/kiri/src/ui/lang/ar.json
index 3d6a63d2..c59d30fa 100644
--- a/crates/kiri/src/ui/lang/ar.json
+++ b/crates/kiri/src/ui/lang/ar.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "تمرير USB جديد: أخبرنا كيف يعمل مع أجهزتك",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu موجود على هذا الكمبيوتر، فاختياره لا ينزّل شيئًا.",
"Undo": "تراجع",
+ "Redo": "إعادة",
+ "Cut": "قص",
+ "Select All": "تحديد الكل",
"Undo brings it back": "«تراجع» يعيده",
"Undo brings them back": "«تراجع» يعيدها",
"Unknown": "غير معروف",
diff --git a/crates/kiri/src/ui/lang/bg.json b/crates/kiri/src/ui/lang/bg.json
index 4f1bb1a9..8d6d5935 100644
--- a/crates/kiri/src/ui/lang/bg.json
+++ b/crates/kiri/src/ui/lang/bg.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "Пренасочването на USB е ново: разкажете ни как работи с вашите устройства",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu вече е на този компютър, затова изборът ѝ не изтегля нищо.",
"Undo": "Отмяна",
+ "Redo": "Повторение",
+ "Cut": "Изрязване",
+ "Select All": "Избиране на всички",
"Undo brings it back": "„Отмяна“ го връща",
"Undo brings them back": "„Отмяна“ ги връща",
"Unknown": "Неизвестно",
diff --git a/crates/kiri/src/ui/lang/bn.json b/crates/kiri/src/ui/lang/bn.json
index 896a2929..8cc75d04 100644
--- a/crates/kiri/src/ui/lang/bn.json
+++ b/crates/kiri/src/ui/lang/bn.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "USB পাসথ্রু নতুন: আপনার ডিভাইসগুলোর সঙ্গে এটি কেমন কাজ করে আমাদের জানান",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu এই PC-তে আগে থেকেই আছে, তাই এটি বাছলে কিছুই ডাউনলোড হবে না।",
"Undo": "পূর্বাবস্থায় ফেরান",
+ "Redo": "আবার করুন",
+ "Cut": "কাটুন",
+ "Select All": "সব নির্বাচন করুন",
"Undo brings it back": "পূর্বাবস্থায় ফেরালে এটি ফিরে আসবে",
"Undo brings them back": "পূর্বাবস্থায় ফেরালে এগুলো ফিরে আসবে",
"Unknown": "অজানা",
diff --git a/crates/kiri/src/ui/lang/ca.json b/crates/kiri/src/ui/lang/ca.json
index 05d17b03..805380c5 100644
--- a/crates/kiri/src/ui/lang/ca.json
+++ b/crates/kiri/src/ui/lang/ca.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "El pas d'USB és nou: explica'ns com funciona amb els teus dispositius",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu ja és en aquest PC, així que si el tries no es baixa res.",
"Undo": "Desfés",
+ "Redo": "Refés",
+ "Cut": "Retalla",
+ "Select All": "Selecciona-ho tot",
"Undo brings it back": "Desfés el recupera",
"Undo brings them back": "Desfés els recupera",
"Unknown": "Desconegut",
diff --git a/crates/kiri/src/ui/lang/ckb.json b/crates/kiri/src/ui/lang/ckb.json
index f5b19006..51b16844 100644
--- a/crates/kiri/src/ui/lang/ckb.json
+++ b/crates/kiri/src/ui/lang/ckb.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "تێپەڕاندنی USB نوێیە: پێمان بڵێ چۆن لەگەڵ ئامێرەکانت کاردەکات",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu پێشتر لەسەر ئەم کۆمپیوتەرەیە، بۆیە هەڵبژاردنی هیچ داناگرێت.",
"Undo": "هەڵوەشاندنەوە",
+ "Redo": "دووبارەکردنەوە",
+ "Cut": "بڕین",
+ "Select All": "هەمووی هەڵبژێرە",
"Undo brings it back": "«هەڵوەشاندنەوە» دەیگەڕێنێتەوە",
"Undo brings them back": "«هەڵوەشاندنەوە» دەیانگەڕێنێتەوە",
"Unknown": "نەناسراو",
diff --git a/crates/kiri/src/ui/lang/cs.json b/crates/kiri/src/ui/lang/cs.json
index 2aa4c1b4..31306430 100644
--- a/crates/kiri/src/ui/lang/cs.json
+++ b/crates/kiri/src/ui/lang/cs.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "Předávání USB je novinka: dejte nám vědět, jak funguje s vašimi zařízeními",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu už na tomto počítači je, takže tato volba nic nestahuje.",
"Undo": "Zpět",
+ "Redo": "Znovu",
+ "Cut": "Vyjmout",
+ "Select All": "Vybrat vše",
"Undo brings it back": "Akce Zpět ho vrátí",
"Undo brings them back": "Akce Zpět je vrátí",
"Unknown": "Neznámá",
diff --git a/crates/kiri/src/ui/lang/de.json b/crates/kiri/src/ui/lang/de.json
index ccd4bad9..57e62434 100644
--- a/crates/kiri/src/ui/lang/de.json
+++ b/crates/kiri/src/ui/lang/de.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "USB-Passthrough ist neu: Sag uns, wie es mit deinen Geräten funktioniert",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu ist schon auf diesem PC, die Wahl lädt also nichts herunter.",
"Undo": "Rückgängig",
+ "Redo": "Wiederholen",
+ "Cut": "Ausschneiden",
+ "Select All": "Alles auswählen",
"Undo brings it back": "Rückgängig holt ihn zurück",
"Undo brings them back": "Rückgängig holt sie zurück",
"Unknown": "Unbekannt",
diff --git a/crates/kiri/src/ui/lang/el.json b/crates/kiri/src/ui/lang/el.json
index c43649bb..1c595919 100644
--- a/crates/kiri/src/ui/lang/el.json
+++ b/crates/kiri/src/ui/lang/el.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "Η μεταβίβαση USB είναι νέα: πείτε μας πώς λειτουργεί με τις συσκευές σας",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Το Ubuntu υπάρχει ήδη σε αυτό το PC, οπότε αν το επιλέξετε δεν γίνεται καμία λήψη.",
"Undo": "Αναίρεση",
+ "Redo": "Επανάληψη",
+ "Cut": "Αποκοπή",
+ "Select All": "Επιλογή όλων",
"Undo brings it back": "Η αναίρεση το επαναφέρει",
"Undo brings them back": "Η αναίρεση τα επαναφέρει",
"Unknown": "Άγνωστο",
diff --git a/crates/kiri/src/ui/lang/es.json b/crates/kiri/src/ui/lang/es.json
index ba9e3425..cc6157ab 100644
--- a/crates/kiri/src/ui/lang/es.json
+++ b/crates/kiri/src/ui/lang/es.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "El paso de USB es nuevo: cuéntanos cómo funciona con tus dispositivos",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu ya está en este PC, así que elegirlo no descarga nada.",
"Undo": "Deshacer",
+ "Redo": "Rehacer",
+ "Cut": "Cortar",
+ "Select All": "Seleccionar todo",
"Undo brings it back": "Deshacer lo recupera",
"Undo brings them back": "Deshacer los recupera",
"Unknown": "Desconocido",
diff --git a/crates/kiri/src/ui/lang/fa.json b/crates/kiri/src/ui/lang/fa.json
index 3f7077e8..c2e49108 100644
--- a/crates/kiri/src/ui/lang/fa.json
+++ b/crates/kiri/src/ui/lang/fa.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "انتقال USB تازه است: بگویید با دستگاههایتان چطور کار میکند",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu از قبل روی این رایانه هست، پس انتخابش چیزی دانلود نمیکند.",
"Undo": "واگرد",
+ "Redo": "انجام دوباره",
+ "Cut": "برش",
+ "Select All": "انتخاب همه",
"Undo brings it back": "«واگرد» آن را برمیگرداند",
"Undo brings them back": "«واگرد» آنها را برمیگرداند",
"Unknown": "نامشخص",
diff --git a/crates/kiri/src/ui/lang/fi.json b/crates/kiri/src/ui/lang/fi.json
index 4a6c8c3d..0562d95c 100644
--- a/crates/kiri/src/ui/lang/fi.json
+++ b/crates/kiri/src/ui/lang/fi.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "USB-läpivienti on uusi: kerro meille, miten se toimii laitteidesi kanssa",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu on jo tässä PC:ssä, joten sen valitseminen ei lataa mitään.",
"Undo": "Kumoa",
+ "Redo": "Tee uudelleen",
+ "Cut": "Leikkaa",
+ "Select All": "Valitse kaikki",
"Undo brings it back": "Kumoa tuo sen takaisin",
"Undo brings them back": "Kumoa tuo ne takaisin",
"Unknown": "Tuntematon",
diff --git a/crates/kiri/src/ui/lang/fr.json b/crates/kiri/src/ui/lang/fr.json
index f27e688e..25fedf43 100644
--- a/crates/kiri/src/ui/lang/fr.json
+++ b/crates/kiri/src/ui/lang/fr.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "Le passage USB est nouveau : dites-nous comment il fonctionne avec vos appareils",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu est déjà sur ce PC : le choisir ne télécharge rien.",
"Undo": "Annuler",
+ "Redo": "Rétablir",
+ "Cut": "Couper",
+ "Select All": "Tout sélectionner",
"Undo brings it back": "Annuler le rétablit",
"Undo brings them back": "Annuler les rétablit",
"Unknown": "Inconnu",
diff --git a/crates/kiri/src/ui/lang/hi.json b/crates/kiri/src/ui/lang/hi.json
index 3cf1153d..229bdb35 100644
--- a/crates/kiri/src/ui/lang/hi.json
+++ b/crates/kiri/src/ui/lang/hi.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "USB पासथ्रू नया है: हमें बताएँ कि यह आपके डिवाइस के साथ कैसे काम करता है",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu इस PC पर पहले से है, इसलिए इसे चुनने से कुछ डाउनलोड नहीं होता।",
"Undo": "पहले जैसा करें",
+ "Redo": "फिर से करें",
+ "Cut": "काटें",
+ "Select All": "सभी चुनें",
"Undo brings it back": "पहले जैसा करें इसे वापस लाता है",
"Undo brings them back": "पहले जैसा करें इन्हें वापस लाता है",
"Unknown": "अज्ञात",
diff --git a/crates/kiri/src/ui/lang/hu.json b/crates/kiri/src/ui/lang/hu.json
index cc47e1d6..d8b9a01d 100644
--- a/crates/kiri/src/ui/lang/hu.json
+++ b/crates/kiri/src/ui/lang/hu.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "Az USB-átadás új: mondd el, hogy működik az eszközeiddel",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Az Ubuntu már megvan ezen a gépen, így a választása semmit sem tölt le.",
"Undo": "Visszavonás",
+ "Redo": "Ismétlés",
+ "Cut": "Kivágás",
+ "Select All": "Összes kijelölése",
"Undo brings it back": "A Visszavonás visszahozza",
"Undo brings them back": "A Visszavonás visszahozza őket",
"Unknown": "Ismeretlen",
diff --git a/crates/kiri/src/ui/lang/id.json b/crates/kiri/src/ui/lang/id.json
index 5ae9d7bc..0a801e56 100644
--- a/crates/kiri/src/ui/lang/id.json
+++ b/crates/kiri/src/ui/lang/id.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "USB passthrough baru: beri tahu kami cara kerjanya dengan perangkat Anda",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu sudah ada di PC ini, jadi memilihnya tidak mengunduh apa pun.",
"Undo": "Urungkan",
+ "Redo": "Ulangi",
+ "Cut": "Potong",
+ "Select All": "Pilih semua",
"Undo brings it back": "Urungkan untuk mengembalikannya",
"Undo brings them back": "Urungkan untuk mengembalikannya",
"Unknown": "Tidak diketahui",
diff --git a/crates/kiri/src/ui/lang/it.json b/crates/kiri/src/ui/lang/it.json
index 9ec7255d..e1558e1b 100644
--- a/crates/kiri/src/ui/lang/it.json
+++ b/crates/kiri/src/ui/lang/it.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "Il passthrough USB è nuovo: dicci come funziona con i tuoi dispositivi",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu è già su questo PC, quindi sceglierlo non scarica nulla.",
"Undo": "Annulla",
+ "Redo": "Ripeti",
+ "Cut": "Taglia",
+ "Select All": "Seleziona tutto",
"Undo brings it back": "Annulla lo ripristina",
"Undo brings them back": "Annulla li ripristina",
"Unknown": "Sconosciuto",
diff --git a/crates/kiri/src/ui/lang/ja.json b/crates/kiri/src/ui/lang/ja.json
index edf9a8b1..047518b9 100644
--- a/crates/kiri/src/ui/lang/ja.json
+++ b/crates/kiri/src/ui/lang/ja.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "USB パススルーは新機能です。お使いのデバイスでの動作を教えてください",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "この PC にはすでに Ubuntu があるため、選択しても何もダウンロードされません。",
"Undo": "取り消す",
+ "Redo": "やり直す",
+ "Cut": "カット",
+ "Select All": "すべてを選択",
"Undo brings it back": "取り消すと元に戻ります",
"Undo brings them back": "取り消すと元に戻ります",
"Unknown": "不明",
diff --git a/crates/kiri/src/ui/lang/kk.json b/crates/kiri/src/ui/lang/kk.json
index 3f8ab682..8bcf4a11 100644
--- a/crates/kiri/src/ui/lang/kk.json
+++ b/crates/kiri/src/ui/lang/kk.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "USB өткізу – жаңа мүмкіндік: оның құрылғыларыңызбен қалай жұмыс істейтінін айтыңыз",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu бұл компьютерде бар, сондықтан оны таңдасаңыз, ештеңе жүктелмейді.",
"Undo": "Болдырмау",
+ "Redo": "Қайталау",
+ "Cut": "Қию",
+ "Select All": "Барлығын таңдау",
"Undo brings it back": "«Болдырмау» оны қайтарады",
"Undo brings them back": "«Болдырмау» оларды қайтарады",
"Unknown": "Белгісіз",
diff --git a/crates/kiri/src/ui/lang/ko.json b/crates/kiri/src/ui/lang/ko.json
index 2292cab3..8d0d6184 100644
--- a/crates/kiri/src/ui/lang/ko.json
+++ b/crates/kiri/src/ui/lang/ko.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "USB 패스스루는 새 기능입니다. 사용하는 기기에서 어떻게 작동하는지 알려 주세요",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "이 PC에 이미 Ubuntu가 있으므로 선택해도 다운로드하지 않습니다.",
"Undo": "실행 취소",
+ "Redo": "다시 실행",
+ "Cut": "오려두기",
+ "Select All": "모두 선택",
"Undo brings it back": "실행 취소로 되돌릴 수 있습니다",
"Undo brings them back": "실행 취소로 되돌릴 수 있습니다",
"Unknown": "알 수 없음",
diff --git a/crates/kiri/src/ui/lang/lo.json b/crates/kiri/src/ui/lang/lo.json
index c315a7ea..d9fbbcb9 100644
--- a/crates/kiri/src/ui/lang/lo.json
+++ b/crates/kiri/src/ui/lang/lo.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "ການສົ່ງຜ່ານ USB ແມ່ນຂອງໃໝ່: ບອກພວກເຮົາວ່າມັນໃຊ້ກັບອຸປະກອນຂອງທ່ານເປັນແນວໃດ",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu ມີຢູ່ໃນ PC ນີ້ແລ້ວ, ສະນັ້ນການເລືອກມັນບໍ່ຕ້ອງດາວໂຫຼດຫຍັງ.",
"Undo": "ຍົກເລີກການກະທຳ",
+ "Redo": "ເຮັດຄືນ",
+ "Cut": "ຕັດ",
+ "Select All": "ເລືອກທັງໝົດ",
"Undo brings it back": "ຍົກເລີກການກະທຳ ຈະເອົາມັນຄືນມາ",
"Undo brings them back": "ຍົກເລີກການກະທຳ ຈະເອົາພວກມັນຄືນມາ",
"Unknown": "ບໍ່ຮູ້ຈັກ",
diff --git a/crates/kiri/src/ui/lang/lt.json b/crates/kiri/src/ui/lang/lt.json
index ba635078..42b21239 100644
--- a/crates/kiri/src/ui/lang/lt.json
+++ b/crates/kiri/src/ui/lang/lt.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "USB perdavimas – naujiena: papasakokite, kaip jis veikia su jūsų įrenginiais",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu jau yra šiame kompiuteryje, todėl jį pasirinkus nieko neatsisiunčiama.",
"Undo": "Anuliuoti",
+ "Redo": "Pakartoti",
+ "Cut": "Iškirpti",
+ "Select All": "Pažymėti viską",
"Undo brings it back": "Anuliavus jis grąžinamas",
"Undo brings them back": "Anuliavus jie grąžinami",
"Unknown": "Nežinoma",
diff --git a/crates/kiri/src/ui/lang/nb.json b/crates/kiri/src/ui/lang/nb.json
index 652154fd..ed64c4bc 100644
--- a/crates/kiri/src/ui/lang/nb.json
+++ b/crates/kiri/src/ui/lang/nb.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "USB-gjennomføring er nytt: fortell oss hvordan det virker med enhetene dine",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu finnes allerede på denne PC-en, så hvis du velger den, lastes ingenting ned.",
"Undo": "Angre",
+ "Redo": "Gjør om",
+ "Cut": "Klipp ut",
+ "Select All": "Marker alt",
"Undo brings it back": "Angre henter den tilbake",
"Undo brings them back": "Angre henter dem tilbake",
"Unknown": "Ukjent",
diff --git a/crates/kiri/src/ui/lang/pl.json b/crates/kiri/src/ui/lang/pl.json
index ebc1c0f6..69fb97fc 100644
--- a/crates/kiri/src/ui/lang/pl.json
+++ b/crates/kiri/src/ui/lang/pl.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "Przekazywanie USB jest nowe: daj znać, jak działa z Twoimi urządzeniami",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu jest już na tym komputerze, więc ten wybór niczego nie pobiera.",
"Undo": "Cofnij",
+ "Redo": "Ponów",
+ "Cut": "Wytnij",
+ "Select All": "Zaznacz wszystko",
"Undo brings it back": "Cofnij przywróci go",
"Undo brings them back": "Cofnij przywróci je",
"Unknown": "Nieznana",
diff --git a/crates/kiri/src/ui/lang/pt-BR.json b/crates/kiri/src/ui/lang/pt-BR.json
index 47f085e5..b6f1383c 100644
--- a/crates/kiri/src/ui/lang/pt-BR.json
+++ b/crates/kiri/src/ui/lang/pt-BR.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "A passagem de USB é nova: conte como ela funciona com seus dispositivos",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "O Ubuntu já está neste PC, então escolhê-lo não baixa nada.",
"Undo": "Desfazer",
+ "Redo": "Refazer",
+ "Cut": "Recortar",
+ "Select All": "Selecionar Tudo",
"Undo brings it back": "Desfazer traz de volta",
"Undo brings them back": "Desfazer traz de volta",
"Unknown": "Desconhecida",
diff --git a/crates/kiri/src/ui/lang/ro.json b/crates/kiri/src/ui/lang/ro.json
index ceea05a2..2cf0dfef 100644
--- a/crates/kiri/src/ui/lang/ro.json
+++ b/crates/kiri/src/ui/lang/ro.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "Transferul USB este nou: spune-ne cum funcționează cu dispozitivele tale",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu este deja pe acest PC, așa că dacă îl alegi nu se descarcă nimic.",
"Undo": "Anulează",
+ "Redo": "Refă",
+ "Cut": "Decupează",
+ "Select All": "Selectează tot",
"Undo brings it back": "Anulează îl readuce",
"Undo brings them back": "Anulează le readuce",
"Unknown": "Necunoscut",
diff --git a/crates/kiri/src/ui/lang/ru.json b/crates/kiri/src/ui/lang/ru.json
index 7c2e24e4..b4fd96b2 100644
--- a/crates/kiri/src/ui/lang/ru.json
+++ b/crates/kiri/src/ui/lang/ru.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "Проброс USB — новинка: расскажите, как он работает с вашими устройствами",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu уже есть на этом ПК, поэтому при её выборе ничего не скачивается.",
"Undo": "Отменить",
+ "Redo": "Повторить",
+ "Cut": "Вырезать",
+ "Select All": "Выбрать всё",
"Undo brings it back": "«Отменить» вернёт его",
"Undo brings them back": "«Отменить» вернёт их",
"Unknown": "Неизвестно",
diff --git a/crates/kiri/src/ui/lang/sl.json b/crates/kiri/src/ui/lang/sl.json
index 4bb4a533..4b1033c6 100644
--- a/crates/kiri/src/ui/lang/sl.json
+++ b/crates/kiri/src/ui/lang/sl.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "Posredovanje USB je novo: povejte nam, kako deluje z vašimi napravami",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu je že v tem računalniku, zato ta izbira ne prenese ničesar.",
"Undo": "Razveljavi",
+ "Redo": "Ponovi",
+ "Cut": "Izreži",
+ "Select All": "Izberi vse",
"Undo brings it back": "Razveljavi ga vrne",
"Undo brings them back": "Razveljavi jih vrne",
"Unknown": "Neznano",
diff --git a/crates/kiri/src/ui/lang/sq.json b/crates/kiri/src/ui/lang/sq.json
index 31a0c006..a7950a0c 100644
--- a/crates/kiri/src/ui/lang/sq.json
+++ b/crates/kiri/src/ui/lang/sq.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "Kalimi i USB-së është i ri: na tregoni si punon me pajisjet tuaja",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu është tashmë në këtë PC, ndaj zgjedhja e tij nuk shkarkon asgjë.",
"Undo": "Zhbëj",
+ "Redo": "Ribëj",
+ "Cut": "Prit",
+ "Select All": "Përzgjidh të gjitha",
"Undo brings it back": "Zhbëj e rikthen",
"Undo brings them back": "Zhbëj i rikthen",
"Unknown": "E panjohur",
diff --git a/crates/kiri/src/ui/lang/ta.json b/crates/kiri/src/ui/lang/ta.json
index 81e779e4..f167f9a4 100644
--- a/crates/kiri/src/ui/lang/ta.json
+++ b/crates/kiri/src/ui/lang/ta.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "USB passthrough புதியது: உங்கள் சாதனங்களுடன் எப்படி வேலை செய்கிறது என்று சொல்லுங்கள்",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu ஏற்கெனவே இந்த PC-யில் உள்ளது, எனவே அதைத் தேர்ந்தெடுத்தால் எதுவும் பதிவிறக்கப்படாது.",
"Undo": "செயல்தவிர்",
+ "Redo": "மீண்டும் செய்",
+ "Cut": "வெட்டு",
+ "Select All": "அனைத்தையும் தேர்ந்தெடு",
"Undo brings it back": "செயல்தவிர் அதைத் திரும்பக் கொண்டு வரும்",
"Undo brings them back": "செயல்தவிர் அவற்றைத் திரும்பக் கொண்டு வரும்",
"Unknown": "தெரியாதது",
diff --git a/crates/kiri/src/ui/lang/te.json b/crates/kiri/src/ui/lang/te.json
index 636a3ac0..06d2d405 100644
--- a/crates/kiri/src/ui/lang/te.json
+++ b/crates/kiri/src/ui/lang/te.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "USB పాస్త్రూ కొత్తది: మీ డివైస్లతో ఎలా పనిచేస్తుందో మాకు చెప్పండి",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu ఇప్పటికే ఈ PCలో ఉంది, కాబట్టి దాన్ని ఎంచుకుంటే ఏమీ డౌన్లోడ్ అవ్వదు.",
"Undo": "రద్దు చేయి",
+ "Redo": "మళ్లీ చేయి",
+ "Cut": "కత్తిరించు",
+ "Select All": "అన్నింటినీ ఎంచుకోండి",
"Undo brings it back": "రద్దు చేస్తే అది తిరిగి వస్తుంది",
"Undo brings them back": "రద్దు చేస్తే అవి తిరిగి వస్తాయి",
"Unknown": "తెలియదు",
diff --git a/crates/kiri/src/ui/lang/th.json b/crates/kiri/src/ui/lang/th.json
index 2bd397e3..d6e67872 100644
--- a/crates/kiri/src/ui/lang/th.json
+++ b/crates/kiri/src/ui/lang/th.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "การส่งผ่าน USB เป็นของใหม่: บอกเราว่าใช้กับอุปกรณ์ของคุณเป็นอย่างไร",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "มี Ubuntu อยู่บน PC เครื่องนี้แล้ว การเลือกจึงไม่ต้องดาวน์โหลดอะไร",
"Undo": "เลิกทำ",
+ "Redo": "ทำซ้ำ",
+ "Cut": "ตัด",
+ "Select All": "เลือกทั้งหมด",
"Undo brings it back": "เลิกทำจะนำกลับมา",
"Undo brings them back": "เลิกทำจะนำกลับมา",
"Unknown": "ไม่ทราบ",
diff --git a/crates/kiri/src/ui/lang/tr.json b/crates/kiri/src/ui/lang/tr.json
index d1906931..df1b802a 100644
--- a/crates/kiri/src/ui/lang/tr.json
+++ b/crates/kiri/src/ui/lang/tr.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "USB aktarımı yeni: cihazlarınızla nasıl çalıştığını bize anlatın",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu bu PC'de zaten var; onu seçmek hiçbir şey indirmez.",
"Undo": "Geri al",
+ "Redo": "Yinele",
+ "Cut": "Kes",
+ "Select All": "Tümünü Seç",
"Undo brings it back": "Geri al ile geri getirilebilir",
"Undo brings them back": "Geri al ile geri getirilebilir",
"Unknown": "Bilinmiyor",
diff --git a/crates/kiri/src/ui/lang/uk.json b/crates/kiri/src/ui/lang/uk.json
index 1138abc9..1dc320f3 100644
--- a/crates/kiri/src/ui/lang/uk.json
+++ b/crates/kiri/src/ui/lang/uk.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "Прокидання USB — новинка: розкажіть, як воно працює з вашими пристроями",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu вже є на цьому ПК, тож якщо вибрати її, нічого не завантажуватиметься.",
"Undo": "Скасувати",
+ "Redo": "Повторити",
+ "Cut": "Вирізати",
+ "Select All": "Вибрати все",
"Undo brings it back": "«Скасувати» поверне його",
"Undo brings them back": "«Скасувати» поверне їх",
"Unknown": "Невідомо",
diff --git a/crates/kiri/src/ui/lang/vi.json b/crates/kiri/src/ui/lang/vi.json
index 0bab3fa2..bccf3a2d 100644
--- a/crates/kiri/src/ui/lang/vi.json
+++ b/crates/kiri/src/ui/lang/vi.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "Chuyển tiếp USB là tính năng mới: cho chúng tôi biết nó hoạt động thế nào với thiết bị của bạn",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "Ubuntu đã có trên PC này, nên chọn nó sẽ không phải tải gì.",
"Undo": "Hoàn tác",
+ "Redo": "Làm lại",
+ "Cut": "Cắt",
+ "Select All": "Chọn tất cả",
"Undo brings it back": "Hoàn tác sẽ khôi phục nó",
"Undo brings them back": "Hoàn tác sẽ khôi phục chúng",
"Unknown": "Không xác định",
diff --git a/crates/kiri/src/ui/lang/zh-Hans.json b/crates/kiri/src/ui/lang/zh-Hans.json
index a1e6bf3a..0ad21388 100644
--- a/crates/kiri/src/ui/lang/zh-Hans.json
+++ b/crates/kiri/src/ui/lang/zh-Hans.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "USB 直通是新功能:告诉我们它在你的设备上表现如何",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "这台电脑上已有 Ubuntu,选择它无需下载任何内容。",
"Undo": "撤销",
+ "Redo": "重做",
+ "Cut": "剪切",
+ "Select All": "全选",
"Undo brings it back": "撤销可将其恢复",
"Undo brings them back": "撤销可将它们恢复",
"Unknown": "未知",
diff --git a/crates/kiri/src/ui/lang/zh-Hant.json b/crates/kiri/src/ui/lang/zh-Hant.json
index e721e5bd..ef978d0a 100644
--- a/crates/kiri/src/ui/lang/zh-Hant.json
+++ b/crates/kiri/src/ui/lang/zh-Hant.json
@@ -1196,6 +1196,9 @@
"USB passthrough is new: tell us how it works with your devices": "USB 直通是新功能:告訴我們它在你的裝置上表現如何",
"Ubuntu is already on this PC, so choosing it downloads nothing.": "這台電腦上已有 Ubuntu,選擇它不需下載任何內容。",
"Undo": "復原",
+ "Redo": "重做",
+ "Cut": "剪下",
+ "Select All": "全選",
"Undo brings it back": "按「復原」即可還原",
"Undo brings them back": "按「復原」即可全部還原",
"Unknown": "未知",
diff --git a/crates/kiri/src/ui/mac.rs b/crates/kiri/src/ui/mac.rs
index 8b16452a..d117a5c9 100644
--- a/crates/kiri/src/ui/mac.rs
+++ b/crates/kiri/src/ui/mac.rs
@@ -257,7 +257,9 @@ fn show_window(mtm: MainThreadMarker) {
}
/// The app menu, so the standard shortcuts work: ⌘Q quits (the daemon keeps
-/// running), ⌘W closes, ⌘H hides, ⌘, opens Settings.
+/// running), ⌘W closes, ⌘H hides, ⌘, opens Settings. The Edit menu is also
+/// required: AppKit sends the standard text actions for ⌘A, ⌘Z and friends
+/// through the responder chain to the focused WKWebView input.
fn main_menu(mtm: MainThreadMarker) -> Retained {
let l = super::lang::resolve(prefs()["lang"].as_str());
let tr = |en: &str| super::lang::tr(l, en);
@@ -285,6 +287,21 @@ fn main_menu(mtm: MainThreadMarker) -> Retained {
app_menu.addItem(&item(&app("Quit {app}"), sel!(terminate:), "q"));
let app_item = NSMenuItem::new(mtm);
app_item.setSubmenu(Some(&app_menu));
+
+ // Standard text actions go through the first responder, which is the
+ // WKWebView's focused input when the search field has focus.
+ let edit_menu = NSMenu::new(mtm);
+ edit_menu.setTitle(&NSString::from_str(&tr("Edit")));
+ edit_menu.addItem(&item(&tr("Undo"), sel!(undo:), "z"));
+ edit_menu.addItem(&item(&tr("Redo"), sel!(redo:), "Z"));
+ edit_menu.addItem(&NSMenuItem::separatorItem(mtm));
+ edit_menu.addItem(&item(&tr("Cut"), sel!(cut:), "x"));
+ edit_menu.addItem(&item(&tr("Copy"), sel!(copy:), "c"));
+ edit_menu.addItem(&item(&tr("Paste"), sel!(paste:), "v"));
+ edit_menu.addItem(&item(&tr("Select All"), sel!(selectAll:), "a"));
+ let edit_item = NSMenuItem::new(mtm);
+ edit_item.setSubmenu(Some(&edit_menu));
+
// View: ⌘+ / ⌘− / ⌘0 step the text size Settings → Appearance sets.
let view_menu = NSMenu::new(mtm);
view_menu.setTitle(&NSString::from_str(&tr("View")));
@@ -295,6 +312,7 @@ fn main_menu(mtm: MainThreadMarker) -> Retained {
view_item.setSubmenu(Some(&view_menu));
let bar = NSMenu::new(mtm);
bar.addItem(&app_item);
+ bar.addItem(&edit_item);
bar.addItem(&view_item);
bar
}
diff --git a/tests/ui/strip.js b/tests/ui/strip.js
index 7f3564f4..ed104a10 100644
--- a/tests/ui/strip.js
+++ b/tests/ui/strip.js
@@ -46,6 +46,14 @@ t("the page has no Filter box: the strip's search narrows the list", () => {
q.dispatchEvent(new KeyboardEvent("keydown", { key: "Escape", bubbles: true }));
if (q.value || ui.filter) throw new Error("not cleared");
});
+t("the search field keeps native text selection and undo", () => {
+ const q = $("gq");
+ if (getComputedStyle(q).userSelect !== "text" || getComputedStyle(q).webkitUserSelect !== "text") throw new Error("text selection is disabled");
+ q.focus(); q.value = "alpha"; q.select();
+ if (!document.execCommand("insertText", false, "beta") || q.value !== "beta") throw new Error("could not edit");
+ if (!document.execCommand("undo") || q.value !== "alpha") throw new Error("undo did not restore the value");
+ q.value = ""; q.dispatchEvent(new Event("input", { bubbles: true }));
+});
t("⌘K / Ctrl+K goes to it", () => {
document.body.focus();
document.dispatchEvent(new KeyboardEvent("keydown", { key: "k", metaKey: !WIN, ctrlKey: WIN, bubbles: true }));