Skip to content

Fix keybinding in entry editor in localized installation#3030

Merged
Siedlerchr merged 1 commit into
masterfrom
fixKeyBindingRegression
Jul 20, 2017
Merged

Fix keybinding in entry editor in localized installation#3030
Siedlerchr merged 1 commit into
masterfrom
fixKeyBindingRegression

Conversation

@Siedlerchr

@Siedlerchr Siedlerchr commented Jul 20, 2017

Copy link
Copy Markdown
Member

Check keycode to avoid localization problems

Follow up from #2853

  • Change in CHANGELOG.md described
  • Tests created for changes
  • Screenshots added (for bigger UI changes)
  • Manually tested changed features in running JabRef
  • Check documentation status (Issue created for outdated help page at help.jabref.org?)
  • If you changed the localization: Did you run gradle localizationUpdate?

Check keycode to avoid localization problems
@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Jul 20, 2017
@stefan-kolb stefan-kolb changed the title Fix keybdining in entry editor in localized installation Fix keybinding in entry editor in localized installation Jul 20, 2017
@matthiasgeiger

Copy link
Copy Markdown
Member

Alternative solution without using the deprecated function:

    private Optional<KeyCode> determineKeyCodeFromKeyEvent(java.awt.event.KeyEvent keyEvent) {
        // special treatment of localized KeyEvents
        if (keyEvent.getKeyCode() == java.awt.event.KeyEvent.VK_DELETE) {
            return Optional.of(KeyCode.DELETE);
        }
        
        return Arrays.stream(KeyCode.values()).filter(k -> k.getName().equals(java.awt.event.KeyEvent.getKeyText(keyEvent.getKeyCode()))).findFirst();
    }

But this only solves the problem for the "delete" key - so we still might have other yet unidentified problems.

So we should decide which route to take ;-)

@koppor

koppor commented Jul 20, 2017

Copy link
Copy Markdown
Member

I would give a +1 for @Siedlerchr's solution, since we surely do not catch all possible keys and the maintable is our next target after the entry editor 😇.

@koppor koppor self-requested a review July 20, 2017 11:06
@Siedlerchr Siedlerchr merged commit 6c4e71c into master Jul 20, 2017
@Siedlerchr Siedlerchr deleted the fixKeyBindingRegression branch July 20, 2017 16:20
Siedlerchr added a commit that referenced this pull request Jul 31, 2017
* upstream/master: (41 commits)
  update xmlunit from 2.3.0 -> 2.4.0
  update wiremock from 2.6.0 -> 2.7.0
  update controlsfx from 8.40.12 -> 8.40.13
  Fix group freeze by running markBasechange in swing thread (#3058)
  Localization: French: translation of new entries (#3050)
  Fix ads fetcher (#3048)
  Update translation (#3041)
  Translate new strings (#3040)
  Fix navigation in entry editor increases modifies font size (#3037)
  Initial idea for architectural decision records (#3033)
  Readd comment
  Readd comment
  Fix keybdining in entry editor in localized installation (#3030)
  Structuring
  Upgrade shadowJar
  Modernizer improvements
  Replace Reimplement MappedList.kt (#3032)
  Use https for the maven ej-technologies repo
  Upgrade modernizer plugin
  Remove separator next to search bar
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants