5digits / dactyl

Pentadactyl and other related Gecko extensions
Other
468 stars 98 forks source link

Backspace not working in any hint mode #142

Open pkillnine opened 8 years ago

pkillnine commented 8 years ago

I can't remove anything i type. I used to be able to.

krompus commented 8 years ago

I'd really like to see a fix for this as well; I didn't realise that it was ever possible to use backspace in hints mode.

It should be noted that backspace DOES work for numbers, so if you've overridden the hints to use alpha/homerow, as many have, consider using the default numbered hints. It's really much nicer than the override, because then you can type some of the words in the link to narrow it down.

troyp commented 8 years ago

I can tell you why that is. The backspace behaviour is explicitly disabled for non-numeric input in the hints.js module (line 687 as of this comment):

    backspace: function () {
        this.clearTimeout();
        if (this.prevInput !== "number")
            return Events.PASS;

        // ...

When I quickly tested commenting-out the conditional, it works with letters the same as with numbers. No immediate problems, but obviously there must have been some reason this was done, so fix it at your own risk.

Incidentally, I don't know if it's just me, but having backspace enabled (either for numbers or letters) causes the hint characters already typed to stop showing in the minibuffer. It probably doesn't matter: the hints are still filtered with each keypress, so you don't really need the information in the minibuffer.

osleg commented 7 years ago

I just use emacs bindings to remove hints i pressed by mistake

krompus commented 7 years ago

@osleg Could you please explain?

osleg commented 7 years ago

Ctrl + w

krompus commented 7 years ago

Danke.