lusakasa / saka-key

A keyboard interface to the web
https://key.saka.io
MIT License
862 stars 70 forks source link

Configure shortcuts in text inputs #87

Open DamienCassou opened 7 years ago

DamienCassou commented 7 years ago

Would it be possible to configure shortcut in text inputs? For example, to go to the beginning/end of line.

eejdoowad commented 7 years ago

Implementing this in Saka Key is straight forward. This is how it would be done:

  1. Change Text mode to look more like Command mode
  2. Implement Commands for Text mode.

Two Questions:

DamienCassou commented 7 years ago

Do you thing the Text mode command binding options should be placed in the same category as existing Command mode bindings? Or should they be placed in a new category just for Text mode bindings?

Saka Key options page has a top-level "Bindings" category with many sub categories such as "Tools" and "Zoom". I would add a new sub category for "Text manipulation". If this gets too large, I would create a new top-level category "Text bindings" with sub categories such as "Cursor movement", and "Inserting".

What commands should be built in?

Many. On top of my head:

eejdoowad commented 7 years ago

How would Text mode work? These are the possibilities I'm thinking:

  1. Modal like vim
  2. Expect users to bind commands to shortcuts with modifier keys
  3. Use an escape key before every command

It's possible to have multiple Text modes, and users can select the one they want to use. I imagine one that mimics vim would be popular.

DamienCassou commented 7 years ago

I'm a full-time Emacs user who would prefer to map his favorite CTRL-based shortcuts in Firefox. That being said, I recognize the superiority of vim editing commands and could probably adapt to that.

ramnes commented 7 years ago

I'm another Emacs user and I'm definitely interested by such a feature, with an escape key before every command. I really want my web browser with Emacs bindings. I've used Uzbl and configured it that way for some time, but its deprecated rendering engine made me go back to Chromium. This feature would definitely make Saka Key a good candidate for my use case.

ldorigo commented 5 years ago

I would also like this. I'd especially be interested in the possibility to quickly jump to the next input field on page without needing to do escape - focus input - input combination.

As for vim/emacs keybindings (inside text inputs), that would be great but it is likely to confuse nontechnical users - it shouldn't be enabled by default.

I would really love a search feature inside the current textarea (that behaves like the '/' command in vim), but that's probably on the harder side to implement.