RxJavaFX
RxJavaFX copied to clipboard
Support scene accelerators
A shortcut for this:
Observable.generate(emitter -> {
scene.getAccelerators().put(new KeyCharacterCombination("c"),
() -> emitter.onNext(true));
});
Can you put in a PR, thanks!
What kind of shortcut do you want to see as result?
val keyCharObservable = eventsOf(scene, EventType<KeyCharacterCombination, "c">)?
@rcd27
Since the signature is:
public ObservableMap<KeyCombination,Runnable> getAccelerators()
so maybe something like this:
val keyCharObservable = withAccelerator(scene, new KeyCharacterCombination("c"))
@thomasnield I think I'm able to do that