Shortcuts - jump to word-boundary

In most applications with text input (for instance, in this text box I’m writing in here), I can use the following keyboard shortcuts (on a Mac) to move the cursor (jump to) the nearest white-space or punctuation (basically a word-boundary):
Option+LeftArrow = jump to the nearest word-boundary to the left of the cursor
Option+RightArrow = jump to the nearest word-boundary to the right of the cursor

However, in ELAN 5.9, the same shortcut is used to move to an adjacent annotation (“go to previous annotation” and “go to next annotation”). I use this shortcut regularly when navigating in an ELAN file in annotation mode, so I don’t want to simply remove this shortcut.

When editing an annotation in-line, this shortcut does not move the cursor within the editing box, but instead reverts to the annotation navigation behavior and moves to another annotation (and thus leaves the annotation I’m trying to edit), when in fact I just want to move to the next word within the current annotation.
When editing an annotation in the pop-up edit box, this shortcut simply does nothing.

Would it be possible to allow this standard text-navigation function when editing an annotation, rather than reverting to navigating between annotations?
Previous versions of ELAN (at least up to 5.7) allowed this shortcut to trigger these different behaviors, depending on the context (whether an annotation was being edited or not). In fact, this is one reason I waited so long to update to 5.9!

(Using ELAN 5.9 on Mac 10.14.6)

Josh

This is strange: on my Mac (macOS 10.15.3) the text-navigation with Option+L/R-Arrow (word boundary) and Command+L/R-Arrow (line boundary) works as expected in the edit boxes. At this moment I don’t have access to a 10.14 macOS, so I can not test whether the OS version explains the difference.
Would reassigning the shortcuts for next/previous annotation to a different combination solve the problem in the text edit boxes? So that you could use both functionalities without interference?

Hi Han, thanks for the reply. It’s interesting that things work fine on OS 10.15. I have been hesitating to upgrade because I would have to give up some 32-bit apps as a result. I’ve also thought about reassigning those shortcuts, but I’d have to retrain my fingers after years of using these shortcuts to navigate, but that might be the best solution for now. If/when I upgrade to OS 10.15, I’ll let you know if the conflict still exists…
josh

Hi Josh, yes I understand, upgrading to 10.15 might break workflows if applications are not available anymore on the new system. Normally I would have been able to test this on a 10.14 and 10.15 side-by-side, but the 10.14 MacBook is at my office which is inaccessible at the moment.
-Han

Hi Han,
I took the opportunity to update to mac OS 10.15, and unfortunately this conflict still exists, so it doesn’t seem to be the OS.

I tried some other troubleshooting tests:

  1. reinstalled ELAN: didn’t help
  2. installed and ran ELAN from my local user’s Application directory (instead of the system-wide directory): didn’t help
  3. clicked “reload default” keyboard shortcuts: initially, I couldn’t navigate between annotations at all, even though the shortcut list indicated that option+arrow should navigate between annotations. I then used “edit shortcut” for each option+arrow (up/down/left/right) shortcut to (re-)assign these shortcuts. Then the shortcuts worked, but the problem still existed (that I can’t navigate with this shortcut between words when editing an annotation)
  4. reassigned these shortcuts to a different key combination (as you suggested), specifically to command+arrow. Those key combinations work fine to navigate between annotations, and do not affect jumping to line boundaries while editing an annotation. But the original problem still exists…

Maybe it’s a java conflict? I’m a bit confused about java, anyway, because java.com tells me to download the most recent version, which is v8.241 from 14.01.2020, but oracle.com/java says the newest version is v14 (SE?), but the TLA-site says the ELAN zip file “includes a Java 11 runtime”. And, to make things more confusing, terminal tells me this:
>java --version
java 13.0.2 2020-01-14
Java™ SE Runtime Environment (build 13.0.2+8)
Java HotSpot™ 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)

Any ideas?

Josh
ELAN 5.9
mac OS 10.15.4 (on one computer; my other computer still has 10.14.6 as I write this)

Two more trouble shooting tests:

  1. I testing things on a friends iMac running mac OS 10.14.6. She didn’t have ELAN, so I downloaded v5.9. The problem was the same, no jumping to a word boundary while editing an annotation.
  2. I tested various keyboard layouts (German, Swedish, Estonian, US-English and my own layout), and that didn’t help either.

Hi Josh,

Yes, ELAN currently comes with a Java 11 runtime, which is not the latest but still fairly recent. Next releases might be released with a newer version (but probably not the latest).
In the meantime I tried on an old Yosemite (10.10) installation that I still have and wasn’t able to reproduce the problem.
Then I tried another preference setting I hadn’t thought of yet; in the Edit Preferences window is a tab Platform/OS, which contains a checkbox “Use Mac Look and Feel”. When I untick this checkbox and relaunch ELAN, I get the behavior you describe. When I switch back to Mac L&F again, after the relaunch the “within text field”, word-by-word navigation works again.

I was under the impression that the Mac L&F has been the default for a long time, but I’ll check the code for this setting (and change it if needed).

I’m sorry I didn’t think of this before.

Hi Han,

Thanks for the new solution. Here’s what happened when I tried it:
On my laptop, I deselected Mac-L&F (it was active), quit ELAN, opened it again, and –– your solution worked!! :slight_smile:
and I was very pleased for about 30 seconds, but then I discoverd that it only worked one time, and then the problem returned. :frowning:

Here’s what happened: I quit ELAN and then opened it again, and the problem was back. Then I tried the following things:

  1. I activated and deacitvated Mac-L&F many many times, each time checking to see if the problem was solved;
  2. I rebooted my computer, tried de/reactivating Mac-L&F;
  3. I reinstalled ELAN, tried de/reactivating Mac-L&F;
  4. I made a backup copy of eveything in my local “~/Library/Preferences/ELAN/”, then deleted “~/Library/Preferences/ELAN/”, then reinstalled ELAN, then tried de/reactivating Mac-L&F. (I couldn’t find any other files that seemed to come from ELAN, but maybe there are more?)

Unfortunately, none of these things worked.

So then I tried things on my friends iMac (running Mac OS 10.14.6), which has a very brief history of ELAN (I installed it for the first time on her computer yesterday), and the problem exists on her computer, too, and de/reactivating Mac-L&F did not help, not even once. I even deleted (without a backup) “~/Library/Preferences/ELAN/” and the ELAN-app itself (from /Applications/-directory), and then did a completely clean reinstallation of ELAN, but that didn’t help either.

Doing all this, I noticed two things:

  1. after a clean reinstallation of ELAN, “Mac-L&F” is the default, so you probably don’t need to check your code for that.
  2. the default keyboard shortcuts for “Go annotation downward”, “Go annotation upward”, “Go to next annotation” and “Go to previous annotation” are each listed as option+Arrow(down/up/right/left), but none of these actually works when trying to navigate in ELAN. To get them to work, I have to open the shortcut preferences, then click “Edit Shortcut” for each one, and re-assign it, then save the shortcuts; after that, these shortcuts work when navigating between annotations. The strange thing is, in the popup window where you reassign the shortcut, the symbol for the option key (⌥) shows up twice like this: “⌥ + ⌥ + ←”, even though I only push the option key once and don’t hold it. I’ll upload a screenshot.
    As you probably remember, this is the same key combination that doesn’t work for me while editing an annotation. Maybe this is completely irrelevant, but maybe not.


Josh

I’m out of options, then. If it works for some time, or only once, and then fails, I have no idea what causes this or what can be done about it. I don’t expect that further uninstalling and reinstalling etc. will solve this. I have been thinking if there could be System settings (keyboard, shortcuts) that could interfere, but I haven’t found obvious candidates. Maybe other installed software, maybe for input methods? I don’t know.
Maybe it is good to mention that this word-by-word navigation is not something that is in the ELAN code, it is not programmed by us, it is behavior of the Java text field which either is there and works or is absent (depending on the Java runtime implementation).

Thanks for trying to help figure this out! I know it’s not really important overall, probably most users don’t use this key combination to navigate to word boundaries anyway. I use it all the time anytime I’m writing text, coding etc., and ELAN is the only app that it doesn’t work in. I’ll keep thinking about possible conflicts with other settings, software, etc…

This is just to add that I tried to reproduce the Alt+Alt+Arrow error in the Set Shortcut Key window and I failed; I can’t get the double Alt key in the text field. This supports the idea that there is something “strange” with the keyboard or other input source(s).

Ok, the strange thing about that is that I only push the ⌥-key once, but it shows up twice in the input field. But to see what was really happening, I removed ~/Library/Preferences/ELAN/shortcuts1.pfsx, let ELAN re-add this file by saving the defaul shortcuts, then I made a copy of shortcuts1-cp.pfsx, then I re-assigned one shortcut for annotation mode only (“go to previous annotation” which corresponds to the xml-element: prefGroup[@key=“Menu.Options.AnnotationMode”]/prefList[@key=“CommandActions.PreviousAnnotation”] in shortcuts1.pfsx (I’m assuming I understand things correctly), and then I checked the differences (diff-command) between the updated prefs and the backup copy, and the xml-elements had been reordered, but that specific xml-element had NOT been changed at all, and so it didn’t show up in the diff-output.

I normally use the standard German keyboard layout that is part of Mac, although sometimes I use a keyboard layout I designed myself with some special characters. I also tested using other standard system keyboard layouts (Swedish, Estonian), but that didn’t change the strange behavior on my computer. I would think that it’s my specific computer, but I’ve tried it on 4 different computers, and two of them are my friend’s computer and she hadn’t had ELAN on them before, but the same problem existed. But, a friend in Helsinki updated to ELAN 5.9 yesterday on MAC 10.15.4, and he did NOT have any problems like this. Plus, you can’t recreate this problem, either, except one time. I really can’t figure out what the common denominator is between the computers that have this problem and the computers that don’t, except that those that do are all in the same town and have been touched by my fingers, but those don’t seem like reasonable explanations. Plus, it’s only ELAN that has this strange behavior – all of my other apps work fine concerning jumping to a word boundary with ⌥+arrow. I’ve tested everything I can think of, including changing “key-bindings” in X-code, and checking the shortcuts in the keyboard panel of the system settings. Nothing has helped. I also remove the separate java installation I had on my computer, that didn’t help either.

Another little test I did: I downloaded ELAN_5-6-AVFX, and the very first time I opened it, it worked like it should, but the second time I opened it, the strange behavior was back. But even that behavior, I can’t reproduce. It only did that the very first time. Deleting the app, opening the .zip-file again, didn’t reproduce the same results.

I’ve also tried lots of google-searching, but haven’t found anything.

It’s really puzzling.

Could it be some java-path problem? Can I send you the elan0.log file?

As I was writing this, I just tried it one more time with ELAN_5.7-AVFX. I opened the zip file, opened an .eaf using ELAN_5.7-AVFX, and I quickly opened an annotatoin to edit it, and the ⌥-key-combination worked ONE TIME, I could jump to a word-boundary. But then it stopped working, before I even closed the annotation-edit box. Can I send you the elan0.log file, perhaps you could check it out? Or just cop&paste the relevant part here?

It would probably be best if I just accepted this little glitch and get on with my life…

josh

Yes, you may send the log file to me alright (han.sloetjes AT mpi.nl). I don’t expect to find clarifying messages in it, but one never knows. And then, indeed, let’s get on…