Hi,
I can't give you an immediate workaround for this, because the
Copy-Cut-Paste shortcuts are predefined by the Swing framework.
In general, you can customize key bindings in JabRef, although it's a
"hidden" feature. There is even an interface for it, but due to
problems such as with built-in key bindings it has never been exposed.
But you can easily redefine a key binding by adding an entry for it in
your preferences.
I assume you are working on Linux - in that case, open
~/.java/.userPrefs/net/sf/jabref/prefs.xml in a text editor (when
JabRef is not running). Key bindings are defined in a pair of keys,
which probably are not already present:
<entry key="bindNames" value="Cut;Replace string"/>
<entry key="bindings" value="ctrl D;ctrl X"/>
Each of these keys should contain a list separated by semicolons.
bindNames lists the names of the key bindings to redefine, and
bindings lists the keystrokes, so in my setting I'm trying to set
"Cut" to ctrl-D and "Replace string" to ctrl-X. This doesn't quite
work - you'll find that ctrl-D now does indeed perform the cut action,
but ctrl-X still does because JabRef doesn't actively remove those
built-in shortcuts. I don't remember exactly, but I think I've tried
unsuccessfully to change this.
If you are interested in customizing other key bindings, you'll need
to look up the list in the file
src/java/net/sf/jabref/JabRefPreferences.java in the JabRef source
code tree. It contains a list of lines like this:
defKeyBinds.put("Open file", "F4");
where the first string inside the parentheses is the name of a key binding.
--
Morten
2011/6/29 EBo <[email protected]>:
> That has happened to me more than once. That is why I always open up
> the .bib file in an emacs window, edit it, and save. If I blow stuff
> away I can then recover in emacs by resaving. This is a fragile
> workaround. This is one of the primary reasons I basically use jabref
> for little more than generating keys and searching my bib file(s). I
> would love to short circuit this problem somehow. If you come up with a
> solution we would have to discuss hot to make sure it is not overwritten
> with an update (maybe in an rc/init file?).
>
> Thanks Haines for bringing this up,
>
> EBo --
>
>
> On Wed, 29 Jun 2011 09:13:22 -0400, Haines Brown wrote:
>> Most of my work is done with emacs, for which C-x C-s is bound to
>> Save. So when I turn to JabRef, I frequently try to save an entry I
>> have laboriously created with that command and, of course, thereby
>> delete the work, sometimes without even realizing it. Do others have
>> the same problem?
>>
>> I'd like to block the C-x keybinding in jabref and replace it with,
>> say, C-d (I don't know if this is bound to something else) or even
>> C-S-x or C-A-x if necessary. Any way to do this? I imagine that
>> because the C-x is not often used an awkward substitute would not be
>> much of an annoyance.
>>
>> Haines Brown
>>
>>
>>
>> ------------------------------------------------------------------------------
>> All of the data generated in your IT infrastructure is seriously
>> valuable.
>> Why? It contains a definitive record of application performance,
>> security
>> threats, fraudulent activity, and more. Splunk takes this data and
>> makes
>> sense of it. IT sense. And common sense.
>> http://p.sf.net/sfu/splunk-d2d-c2
>> _______________________________________________
>> Jabref-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jabref-users
>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> Jabref-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jabref-users
>
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Jabref-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jabref-users