Closed Derekmini closed 2 months ago
I had a quick look and the Option key should work. Does this code snippet work for you?
I press Option + N
to obtain the desired result as:
I pressed Option + Num
again in Zotero, but it only highlighted the collection of items instead of setting the reading status.
That's interesting - it seems like an existing shortcut is taking precedence and stopping us from detecting the shortcut.
I checked here (https://www.zotero.org/support/kb/keyboard_shortcuts) but didn't see this combination - only that Option+Num should change the annotation tool in the PDF Reader. Is it possible another addon is implementing the shortcut to highlight a collection when you press Option+Num?
On 9/05/2023 11:17 am, Derek wrote:
I press |Option + N| to obtain the desired result as:
I pressed |Option + Num| again in Zotero, but it only highlighted the collection of items instead of setting the reading status.
— Reply to this email directly, view it on GitHub https://github.com/Dominic-DallOsto/zotero-reading-list/issues/9#issuecomment-1539494408, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGM5S3FGCLYGT6FYYEVY323XFIDRXANCNFSM6AAAAAAXVRJWYA. You are receiving this because you commented.Message ID: @.***>
I have disabled all addons except for reading-list, and checked if other background software is using this keyboard shortcut combination. However, I still cannot add Read Status by pressing Option+Num.
I feel that my previous description was unclear. Actually, it is the Option key that triggers the highlight. Pressing the Num key interrupts the continuous highlight. Here is a recording demonstrating this situation:
Same problem here. Thank you for the add-on though! It's great. It'd be even better once the shortcuts work :)
Thanks for the patience!
Are you able to test the latest version for Zotero 7 (#17) - does the issue still occur?
@Dominic-DallOsto I have not yet switched to Zotero 7 as I am waiting for all the add-ons I'm using to be working on the new version, but I will let you know as soon as I have made the switch!
Thanks for the patience!
Are you able to test the latest version for Zotero 7 (#17) - does the issue still occur?
This problem still occurs. I'm now using the latest version Zotero 7 and the latest plugin.
Can you open the Error Console in Zotero (Tools > Developer > Error Console), paste the following code and see if you can get the key presses when using Option+Num
window.addEventListener('keydown', function(e) {
if (["0","1","2","3","4","5","6","7","8","9"].includes(e.key))
console.log(`key: ${e.key}, alt: ${e.altKey}, ctrl: ${e.ctrlKey}, shift: ${e.shiftKey}`);
});
Hi there, sorry for the duplicate issue. I wasn't able to get that code to work in Zotero, but I was able to use the Firefox dev console. I modified the code to not restrict to only number keys. I held Alt, and then pressed 1 through 0, and got the following results:
key: Alt, alt: true, ctrl: false, shift: false
key: ¡, alt: true, ctrl: false, shift: false
key: ™, alt: true, ctrl: false, shift: false
key: £, alt: true, ctrl: false, shift: false
key: ¢, alt: true, ctrl: false, shift: false
key: ∞, alt: true, ctrl: false, shift: false
key: §, alt: true, ctrl: false, shift: false
key: ¶, alt: true, ctrl: false, shift: false
key: •, alt: true, ctrl: false, shift: false
key: ª, alt: true, ctrl: false, shift: false
key: º, alt: true, ctrl: false, shift: false
It looks like the issue is that MacOS is doing a transformation of the key before it is received by the application. Would it be possible to make the keyboard shortcuts configurable?
I found a similar issue here which states that pressing Opt + key on Mac also modifies the keycode instead of returning the original keycode.
:rocket: This ticket has been resolved in v1.3.2. See Release 1.3.2 for release notes.
This has been fixed in v1.3.2 of this plugin, but the fix seems a bit "fragile" / like it might be keyboard / language dependent.
Please let me know if you have any issues in your configuration.
:rocket: This ticket has been resolved in v1.5.1. See Release 1.5.1 for release notes.
Hello, may I ask if shortcut keys can be used on macOS?
I tried using Command+Num, Option+Num, Ctrl+Num but there was no response.