AndBible / and-bible

AndBible: Bible Study
https://andbible.org
GNU General Public License v3.0
588 stars 195 forks source link

Keyboard usage workflows #1878

Open tuomas2 opened 2 years ago

tuomas2 commented 2 years ago

Related: #60

And Bible is becoming more and more usable with devices with keyboard (Windows 11, Android emulators on PC/mac, bluetooth keyboards with tablet etc). With those devices it is not convenient to be touching the screen all the time.

I would like to have shortcuts to help navigating with keyboard over the interface. Most common operations should be doable so that I don't waste time on touching screen for them.

Window operations:

Others:

Navigating on bibleview:

Probably we need to make "keyboard mode" in which:

Some parts can be done already for 4.0 (like adding some shortcut keys) but most of this can be done earliest in 4.1+.

tuomas2 commented 2 years ago

Related: #1583

tuomas2 commented 2 years ago

Hmm ESC key and android's back button seem to give same keycode. That's bad. I don't want to use ESC to travel back in history.

-> okay, I can distinquish it by KeyEvent.getSource

agrogers commented 2 years ago

It seems OK to me. ESC undoes last action.

On Fri, 5 Nov 2021, 1:43 am Tuomas Airaksinen, @.***> wrote:

Hmm ESC key and android's back button seem to give same keycode. That's bad. I really don't want to use ESC as back key in MainBibleWindow.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AndBible/and-bible/issues/1878#issuecomment-961168702, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKGTJQFETRMCFTMUQ3MMUTUKKSZHANCNFSM5GQ7W6VA .

tuomas2 commented 2 years ago

You mean that you would want ESC to go back in history? I think it causes too many unintended back-presses. There must be key for going back in history too, of course.

agrogers commented 2 years ago

If I want to close a dialog I would go for ESC. And if ESC is Back then that works nicely

On Sat, 6 Nov 2021, 7:59 pm Tuomas Airaksinen, @.***> wrote:

You mean that you would want ESC to go back in history? I think it causes too many unintended back-presses. There must be key for going back in history too, of course.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AndBible/and-bible/issues/1878#issuecomment-962427642, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKGTJQ5I6YBUVDOZRRKCHDUKT4BTANCNFSM5GQ7W6VA .

tuomas2 commented 2 years ago

Yes, ESC is "back" in all other ways (closing dialogs, modals etc), but not for going back in history.

tuomas2 commented 2 years ago

There are more and more functional key bindings in 619. Please test and let me know how it feels.

tuomas2 commented 2 years ago

Going down / up smoothly in view Going down / up verse by verse

Webview has its own keyboard "link by link" navigation which seem to be enabled by default. It works sometimes "okay" but sometimes not so nicely.

tuomas2 commented 2 years ago

Some docs about android keyboard navigation in general https://developer.android.com/training/keyboard-input/navigation

tuomas2 commented 2 years ago

Perhaps we should do like this:

agrogers commented 2 years ago

Are you referring to navigating between, say, individual Strong's numbers? Or moving the highlighted verse up and down? That sounds pretty complicated.

I haven't used a keyboard for almost 2 years - my chromebook is stuck in Yangon (or rather I'm stuck in Australia). So I don't know how I would want it to work.

But I like the idea of having two modes - one to navigate outside of webview and one that is inside - did I understand correctly?

What about Alt + Up/Down arrow to move between windows and break out of webview. That could give focus to the window itself (not the button). Could identify that by making the corner highlights thicker. Hitting Enter could then drop you into webview.

Or maybe I am missing your intentions altogether?

On Sat, 13 Nov 2021, 2:36 am Tuomas Airaksinen, @.***> wrote:

Perhaps we should do like this:

  • handle tab and arrow keys like normally, so that each webview is "single focus point".
  • Then enter into bibleview mode by some key, like enter.
    • After entering bibleview mode, you navigate inside webview, with more specific navigation that we can define.
    • From bibleview, you can use alt+* bindings too, to quickly access items outside bibleview.
    • Show focus somehow ("current window indicators" could then change color?)
  • Key to exit bibleview mode (esc, if there is no modal open).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AndBible/and-bible/issues/1878#issuecomment-967252659, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKGTJU33I6AR6RZVWEQNY3ULU7BNANCNFSM5GQ7W6VA .

tuomas2 commented 2 years ago

Are you referring to navigating between, say, individual Strong's numbers? Or moving the highlighted verse up and down? That sounds pretty complicated.

Which part of my text are you referring to? I'm missing something.

I haven't used a keyboard for almost 2 years - my chromebook is stuck in Yangon (or rather I'm stuck in Australia). So I don't know how I would want it to work. But I like the idea of having two modes - one to navigate outside of webview and one that is inside - did I understand correctly?

I think you did understand at least somewhat correctly.

What about Alt + Up/Down arrow to move between windows and break out of webview. That could give focus to the window itself (not the button). Could identify that by making the corner highlights thicker. Hitting Enter could then drop you into webview. Or maybe I am missing your intentions altogether?

I'll experiment something, let's review my ideas after I get something done :-P

Do you think it's okay if these changes are included in prod builds, even though they might change (no "UI" changes)? I thought it's okay, because the "current" keyboard usage is completely unusable, so anything is improvement. And most people don't notice anything because they don't use keyboard.

agrogers commented 2 years ago

Yeah, I wouldn't have an issue with it being included in the production build.

On Sat, 13 Nov 2021, 5:43 pm Tuomas Airaksinen, @.***> wrote:

Are you referring to navigating between, say, individual Strong's numbers? Or moving the highlighted verse up and down? That sounds pretty complicated.

Which part of my text are you referring to? I'm missing something.

I haven't used a keyboard for almost 2 years - my chromebook is stuck in Yangon (or rather I'm stuck in Australia). So I don't know how I would want it to work. But I like the idea of having two modes - one to navigate outside of webview and one that is inside - did I understand correctly?

I think you did understand at least somewhat correctly.

What about Alt + Up/Down arrow to move between windows and break out of webview. That could give focus to the window itself (not the button). Could identify that by making the corner highlights thicker. Hitting Enter could then drop you into webview. Or maybe I am missing your intentions altogether?

I'll experiment something, let's review my ideas after I get something done :-P

Do you think it's okay if these changes are included in prod builds, even though they might change (no "UI" changes)? I thought it's okay, because the "current" keyboard usage is completely unusable, so anything is improvement. And most people don't notice anything because they don't use keyboard.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/AndBible/and-bible/issues/1878#issuecomment-967799605, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKGTJSSCY3EWK2N3JEC6SDULYJLRANCNFSM5GQ7W6VA .

timbze commented 2 years ago

Wish I could test but seems Android Emulator is horrible with accepting keyboard shortcuts. In 1 mode I find only escape works, and in another mode only alt + up and alt + down work. Very weird

tuomas2 commented 2 years ago

I agree. I have to work continuously with my tablet (+ bt keyboard) when doing this.

tuomas2 commented 2 years ago

notes from church

AB: keyboardilla ikkunan koon muutokset. myös max window history back on tärkeä. history popup myös.

studypad edit moodissa "new item" tärkeä. Study pad edit moodissa hyppiminen edelliseen editoitavaan ja seuraavaan tärkeä.

bible selectorissa pitäs keyboardillakin lähtöpiste olla se mikä on highlightattu, mutta ei ole.

jump to verse bibleviewin puolella on selkeä ja nopea toteuttaa.

Jonkinlainen "find" myös tärkeä. Ja tärkeä että se ei turmele historiaa

.