ianrenton / SuccessWhale

:whale: A web-based multi-column social network client. No longer functional or maintained!
BSD 2-Clause "Simplified" License
14 stars 7 forks source link

Keyboard shortcuts! #24

Closed ianrenton closed 10 years ago

ianrenton commented 13 years ago

Jumping left/right through columns with a mouse is annoying. Keyboard shortcuts will protect you from the terrible secret of space.

ianrenton commented 12 years ago

Added up/down/pageup/pagedown scrolling while the main input box has focus.

ianrenton commented 12 years ago

+1 from @marxjohnson on wanting keyboard shortcuts for column left/right. How the heck can we do this while leaving left/right arrow functionality passed to the status input text box. Does Javascript support detecting Ctrl+L/R? Would we want this to be the shortcut anyway - isn't that browser back/forward on Linux?

ianrenton commented 12 years ago

Detecting Ctrl with JS: http://www.javascriptkit.com/javatutors/javascriptkey2.shtml

marxjohnson commented 12 years ago

Alt+Left/Alt+Right are back/forward shortcuts in Firefox: http://support.mozilla.com/en-US/kb/Keyboard%20shortcuts Aparrently Ctrl+left/Crtl+Right moves tabs, which kinda makes sense for this (preventDefault() might stop the key combo's default behaviour?)

ianrenton commented 10 years ago

Attempting a better way of doing keyboard navigation in v3. Because the main post entry box is now a multi-line textarea rather than an input, I'd prefer to keep the arrow keys working as the user expects when that has focus.

The way I've decided to go is that rather than auto-focussing the post entry box, the main body of the page retains focus by default. The page itself now scrolls instead of having an inner div, so Up/Down/Left/Right keys should work as expected. The post entry box can now be focussed by pressing "T" anywhere on the page, and de-focussed by pressing Escape.