aboutsummaryrefslogtreecommitdiff
path: root/ext/js/data
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/data')
-rw-r--r--ext/js/data/options-util.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js
index fd62a558..5b2e2bd3 100644
--- a/ext/js/data/options-util.js
+++ b/ext/js/data/options-util.js
@@ -754,8 +754,32 @@ class OptionsUtil {
// Version 10 changes:
// Removed global option useSettingsV2.
// Added part-of-speech field template.
+ // Added an argument to hotkey inputs.
await this._applyAnkiFieldTemplatesPatch(options, '/data/templates/anki-field-templates-upgrade-v10.handlebars');
delete options.global.useSettingsV2;
+ for (const profile of options.profiles) {
+ for (const hotkey of profile.options.inputs.hotkeys) {
+ switch (hotkey.action) {
+ case 'previousEntry':
+ hotkey.argument = '1';
+ break;
+ case 'previousEntry3':
+ hotkey.action = 'previousEntry';
+ hotkey.argument = '3';
+ break;
+ case 'nextEntry':
+ hotkey.argument = '1';
+ break;
+ case 'nextEntry3':
+ hotkey.action = 'nextEntry';
+ hotkey.argument = '3';
+ break;
+ default:
+ hotkey.argument = '';
+ break;
+ }
+ }
+ }
return options;
}
}