复刻了另一个 Anki 插件(ID:1247884413)的 ALT+Z 快捷键功能 https://ankiweb.net/shared/info/1247884413 这个插件是一个为 Anki 开发的自动化输入辅助工具。
简单来说,它的作用是:“一键复制上一张卡片的对应内容”。
核心功能描述 当你正在连续添加多张卡片时,如果发现当前正在填写的字段(Field)内容与刚刚保存的那张卡片完全一样,你不需要重新输入或手动切换窗口去复制。
操作方式:将光标停留在当前输入框,按下 Alt + Z。
实现效果:插件会自动找到你上一次添加(或最后一次修改)的那条笔记,提取出相同位置字段的内容,并直接填入你当前的输入框中。
实际应用场景 这个插件非常适合以下情况:
批量制卡:比如你正在录入一系列单词,它们的“来源”或“标签”字段内容都是一样的,按下 Alt + Z 即可快速填充。
内容修正:如果你刚添加完一张卡片,发现某个字段写错了,在添加下一张时想沿用之前的模板稍作修改,这个快捷键能省去大量重复劳动。
保持焦点:它在填充内容的同时会保留你的光标位置,不会打断你的输入流。
为什么需要重新做? 因为你使用的 Anki 版本非常新(25.09 版本),它基于最新的 Python 3.13 和 Qt 6.9。很多旧插件使用的内部代码指令(API)已经被 Anki 官方改名或删除了(例如之前报错的 loadNoteKeepFocus)。这次为你重新编写的代码专门适配了最新的 API 命名规范,确保在高性能的 Qt6 环境下能正常运行。
Replicated the ALT+Z hotkey function of another Anki add-on (ID: 1247884413)
Here is a formal English description of the add-on, suitable for a README file or an add-on listing:
Add-on Name: Quick Copy Last Field (Alt+Z) Description: This is a lightweight productivity tool designed for Anki users who perform frequent manual data entry. It allows you to instantly retrieve and insert content from the previous note into your current editing field.
Key Features:
Instant Recall: With a single keystroke (Alt + Z), the add-on fetches the text from the exact same field of the last note you added or modified.
Workflow Continuity: It uses the loadNoteKeepingFocus function to ensure that your cursor stays exactly where it is, allowing you to continue typing without interruption.
Modern Compatibility: Specifically optimized for Anki 23.x, 24.x, and 25.x (Qt6/Python 3.13), fixing the “AttributeError” found in older, deprecated versions of similar plugins.
Ideal Use Cases:
Batch Note Creation: Perfect when you are adding multiple cards that share the same context, source, or category in specific fields.
Repetitive Data Entry: Saves time by eliminating the need to manually copy-paste or re-type recurring information across different notes.