jabref icon indicating copy to clipboard operation
jabref copied to clipboard

Copy \cite{citation key} cmd+C not working in macOS

Open frosales258 opened this issue 3 years ago • 10 comments

JabRef version

5.7 (latest release)

Operating system

macOS

Details on version and operating system

macOS Monterey 12.5.1

Checked with the latest development build

  • [X] I made a backup of my libraries before testing the latest development version.
  • [X] I have tested the latest development version and the problem persists

Steps to reproduce the behaviour

  1. I changed in Options > Preferences > Key binding Edit > Copy \cite{citation key} to Ctrl+C, as cmd+C does not work

  2. After rebooting, the function "Copy \cite{key}" works well from the menu > Edit > Copy... > Copy \cite{citation key} where actually, the key binding appears as cmd+C (see image and log) Captura de Pantalla 2022-08-26 a la(s) 11 50 20

  3. However, when I try the key binding cmd+C in the main window, JabRef goes to the first entry with an author starting by C in my library (in this case, Campbell et al.) and copies the citation key corresponding to that entry (\cite{Campbell1986}) not to the entry that I was highlighting

Captura de Pantalla 2022-08-26 a la(s) 11 50 26
  1. Further, Ctrl+C does not work

I would like cmd+C to work exactly as the menu > Edit > Copy... > Copy \cite{citation key}

Thanks in advance, kind regards!

Appendix

Detail information:
Trust store path: /Users/macbeth/Library/Application Support/JabRef/ssl/truststore.jks
Not updating theme because it hasn't changed
Theme set to Theme{type=DEFAULT, name=''} with base css StyleSheet{jrt:/org.jabref/org/jabref/gui/Base.css}
Index path for /Users/macbeth/Google Drive ([email protected])/papers/JabRef/AllPapers.bib is /Users/macbeth/Library/Application Support/JabRef/lucene92
Copied '\cite{Barnes2002}' to clipboard.
Copied '\cite{Rhea2021}' to clipboard.
Copied '\cite{Berg2013}' to clipboard.
Copied '\cite{Bresolin2007}' to clipboard.
Copied '\cite{Campbell1986}' to clipboard.
Copied '\cite{Campbell1986}' to clipboard.
Copied '\cite{Campbell1986}' to clipboard.
Copied '\cite{Campbell1986}' to clipboard.
Copied '\cite{Campbell1986}' to clipboard.
Copied '\cite{Campbell1986}' to clipboard.
Copied '\cite{Campbell1986}' to clipboard.
Copied '\cite{Campbell1986}' to clipboard.
Copied '\cite{Campbell1986}' to clipboard.

frosales258 avatar Aug 26 '22 19:08 frosales258

On Mac by default, JabRef replaces CTRL with the meta key. This is most likely the option key. Maybe this helps you?

Siedlerchr avatar Sep 16 '22 18:09 Siedlerchr

Hi,

Thanks for the reply! no, it doesn't help, since the problem is that when I make the key combination cmd+C, instead of copying the \cite{ID} it goes to the first publication on the current list starting with "C"

El vie, 16 sept 2022 a la(s) 13:11, Christoph @.***) escribió:

On Mac by default, JabRef replaces CTRL with the meta key. This is most likely the option key. Maybe this helps you?

— Reply to this email directly, view it on GitHub https://github.com/JabRef/jabref/issues/9096#issuecomment-1249663010, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF24KLKZWPQ5DMKH5HIRNXDV6SZ6LANCNFSM57X2O6FQ . You are receiving this because you authored the thread.Message ID: @.***>

frosales258 avatar Sep 19 '22 20:09 frosales258

Okay, thanks for the feedback. I will try to take another look at it the next days

Siedlerchr avatar Sep 19 '22 20:09 Siedlerchr

For JabRef 5.11, MacOS 14.2.1, this problem is still there and reamins unsolved! It has been one year.

hywu-ag avatar Dec 26 '23 06:12 hywu-ag

@hywu-ag Sorry, to hear this but for me the default shortcuts work: Ctrl is mapped to cmd

grafik

Siedlerchr avatar Dec 26 '23 20:12 Siedlerchr

I had encountered the same problem up until 5.9/5.10 (see https://github.com/JabRef/jabref/issues/9276#issuecomment-1697378995), but it seems to be resolved in this version:

JabRef 5.12--2023-12-24--4233bad
Mac OS X 14.2.1 aarch64 
Java 21.0.1 
JavaFX 21.0.1+6

However: There still is one difference in behavior between running the copy command from the menu (Edit > Copy) and running it via keyboard shortcut (CMD-C). If I copy the entry via keyboard shortcut, the notification at the bottom of the window “Copied 1 entry.“ pops up twice. If I copy via menu, it only shows once.

For the extended copy commands, such as copy cite key (CMD-Shift-K) etc. the behavior is not different between menu and shortcut usage.

pcdi avatar Jan 12 '24 06:01 pcdi

Related issue: https://github.com/JabRef/jabref/issues/10771

koppor avatar Mar 25 '24 15:03 koppor

Related issue: https://github.com/JabRef/jabref/issues/11294

koppor avatar May 16 '24 14:05 koppor

However: There still is one difference in behavior between running the copy command from the menu (Edit > Copy) and running it via keyboard shortcut (CMD-C). If I copy the entry via keyboard shortcut, the notification at the bottom of the window “Copied 1 entry.“ pops up twice. If I copy via menu, it only shows once.

It seems that copy is triggered once per macOS operating system call and once per key bindings. Right @Siedlerchr ?

koppor avatar May 16 '24 14:05 koppor

Yes, the key binding is always triggered twice in the scene when it's also attached for a menu. I think this is because of the global menu mac uses.

Siedlerchr avatar May 16 '24 15:05 Siedlerchr