Discussion:
[surf] Follow a link without mouse?
Thuban
2013-01-31 17:18:26 UTC
Permalink
Hello,
surf is supposed to be used via keyboard, but I don't know any useful
way to follow a link without switching to mouse.
Do you have any method?

Regards.
--
,--. Xavier Cartron
: /` ) M2 MEFPC
| `-' Debian user
\_ jabber : ***@jabber.fr
pancake
2013-01-31 17:24:23 UTC
Permalink
http://surf.suckless.org/files/link_hints
Post by Thuban
Hello,
surf is supposed to be used via keyboard, but I don't know any useful
way to follow a link without switching to mouse.
Do you have any method?
Regards.
Nick
2013-01-31 17:37:44 UTC
Permalink
Post by pancake
http://surf.suckless.org/files/link_hints
There are a few other variants on the theme around on the mailing
list archives too, if you're keen. I use one nibble posted a while
ago.
pancake
2013-01-31 17:41:15 UTC
Permalink
afaik the script in the web is the nibble's one.
Post by Nick
Post by pancake
http://surf.suckless.org/files/link_hints
There are a few other variants on the theme around on the mailing
list archives too, if you're keen. I use one nibble posted a while
ago.
Thuban
2013-01-31 17:45:00 UTC
Permalink
I already use a script like this, but don't you think that a javascript
solution is not the best.
When you use surf without javascript (-s), this script is useless.

Regards,
Post by pancake
afaik the script in the web is the nibble's one.
Post by Nick
Post by pancake
http://surf.suckless.org/files/link_hints
There are a few other variants on the theme around on the mailing
list archives too, if you're keen. I use one nibble posted a while
ago.
--
,--. Xavier Cartron
: /` ) M2 MEFPC
| `-' Debian user
\_ jabber : ***@jabber.fr
Nick
2013-01-31 18:22:45 UTC
Permalink
Post by Thuban
I already use a script like this, but don't you think that a javascript
solution is not the best.
When you use surf without javascript (-s), this script is useless.
Yes, I agree it isn't ideal, for that reason. But nobody has written
an alternative. An easier workaround could be to patch surf to
whitelist everything in script.js, even when running 'surf -s'. I
looked briefly into doing this in the past, but didn't figure out
the magic webkit toggle.
Charlie Kester
2013-01-31 17:57:20 UTC
Permalink
Post by Thuban
Hello,
surf is supposed to be used via keyboard, but I don't know any useful
way to follow a link without switching to mouse.
Do you have any method?
Regards.
I confess, it's been a while since I used surf, so maybe it already does
this. But one possibility would be to mimic the links/elinks
keybindings, where the up and down arrow keys (j,k if you insist) move
the focus between links found on the page. The right arrow (l) follows
the currently-focussed link, and the left arrow (h) brings you back.

The problem with links/elinks bindings has always been that people
expect the up and down keys to move the cursor a line at a time. But the
next/prev link might be a half- or full page away and the resulting
screen jumps can be disconcerting. Elinks tries to restore the ability
to scroll a line at a time by using the mouse wheel, but this defeats
the whole point of being keyboard-driven.

The other solution found in links/elinks is to provide numbered hints
like the ones in the plugin pancake suggested.
7***@mail.com
2013-01-31 19:16:13 UTC
Permalink
Post by Thuban
Hello,
surf is supposed to be used via keyboard, but I don't know any useful
way to follow a link without switching to mouse.
Do you have any method?
Regards.
Arrow keys move the focus among links. Enter follows focused links.
--
7heo
p***@lavabit.com
2013-01-31 23:12:43 UTC
Permalink
You can look at Arora. [1] They have implemented "Access keys" without
javascript and Arora is based on webkit. Maybe it is not hard to port
or at least it may be useful to read their code. It is GPLed, however.

[1] https://code.google.com/p/arora/

Loading...