shortcuts : add some, offer possibilities to customize them

Request new functionality here
Christophe-Marie
Bear Rating Trainee
Bear Rating Trainee
Posts: 22
Joined: 09 May 2008, 21:01
Location: France
Contact:

shortcuts : add some, offer possibilities to customize them

Postby Christophe-Marie » 15 May 2008, 04:34

Since I'm a true vim-user, I would like to be able to remap some keys during my browsing of tiny tiny rss : for example, j/k for next/previous article would be a great feature. Of course, I can edit the php (I don't know how to do it, but it must not be so difficult). But I think it would be awesome if there was a special config file to do these mappings.

I also suggest shortcuts that would allow the user to switch to another "panel". for example, in the current philosophy of the shortcuts, left-arrow would allow me to go into the feeds column, right arrow would allow me to go back to the article (Of course, as a vim-user, I would prefer to use 'h' and 'l' to do that). But maybe this is not the most efficient way to do that and the best is to assign a shortcut for each of the tree panels, such as 'gf' (go feeds), 'gl' (go list), 'ga' (go article) (google reader has this kind of shortcuts).

Anyway, adding a possibility to change the focused panel would be really nice since you would be able to totally forget your mouse when reading your rss feeds. You cannot do that for now : if the article is too long, you need to use your mouse for scrolling it. Being able to change the focused panel would be really good, since you would be able to change to the article, scroll down without getting your hands off the keyboard, and get back to the list of article to read the next one. If you want to switch to another feed, you would just go to the list of feeds, select another one, and open it. I think this feature would make tiny tiny rss an even more wonderfull reader.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: shortcuts : add some, offer possibilities to customize them

Postby fox » 15 May 2008, 10:50

1) To do hotkey customization right would require having some way to store hotkeys per-user in the DB, customization dialog in Prefs and code in frontend to get hotkeys from backend and work from there. This is, frankly, too much work (the customization dialog alone... oh boy) for a feature which I don't really consider important enough to have.

Just adding a configuration file would require coding most of the aforementioned mechanisms sans customization UI, and, frankly, if you'll have to edit some global file to customize hotkeys you might as well edit hotkey handler in functions.js. It's really straightforward enough.

2) Again, this is quite a lot of code for something I don't think many users would appreciate. I mean, I use vi because that's what I'm used to, you use vi for whatever reason, but general public really doesn't. Also, I'm not sure that adding modality, especially vi-style modality, to the application is a good idea.

Christophe-Marie
Bear Rating Trainee
Bear Rating Trainee
Posts: 22
Joined: 09 May 2008, 21:01
Location: France
Contact:

Re: shortcuts : add some, offer possibilities to customize them

Postby Christophe-Marie » 15 May 2008, 18:44

fox wrote:1) To do hotkey customization right would require having some way to store hotkeys per-user in the DB, customization dialog in Prefs and code in frontend to get hotkeys from backend and work from there. This is, frankly, too much work (the customization dialog alone... oh boy) for a feature which I don't really consider important enough to have.

Just adding a configuration file would require coding most of the aforementioned mechanisms sans customization UI, and, frankly, if you'll have to edit some global file to customize hotkeys you might as well edit hotkey handler in functions.js. It's really straightforward enough.

You must be right, I had not thought to all the implications. Thank you for the information. So the file is named functions.js?
fox wrote:2) Again, this is quite a lot of code for something I don't think many users would appreciate. I mean, I use vi because that's what I'm used to, you use vi for whatever reason, but general public really doesn't. Also, I'm not sure that adding modality, especially vi-style modality, to the application is a good idea.

I really do think this would be an appreciated improvement. You should see google reader. When you press '?', there is a nice help box that appears in semi transparency, in which all the shortcuts are listed. A lot of people enjoy these shortcuts, as they allow them to not touch there mouse.

But you are right : I don't know how to code it so I don't know if that is hard to do or not :)

Thank you for offering me the possibilities to use free software, to get independent from google, netvibes and all the others, to be able to access my feeds from everywhere and to own my own datas.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: shortcuts : add some, offer possibilities to customize them

Postby fox » 15 May 2008, 22:17

You must be right, I had not thought to all the implications. Thank you for the information. So the file is named functions.js?


Yep. Look for the function hotkey_handler(). It's basically a collection of if-then blocks. You can learn the codes for the hotkeys in the debug window - just enable the window (shift-D) and type.

Having a popup help for shortcuts is a great idea. I feel stupid that I didn't think about it before. :)

Hmm.. I see that GReader uses Emacs-like prefixed hotkeys (g s really looks similar to C-x C-f to me). This might be a good thing to implement. Maybe I misunderstood you, I thought you were proposing to implement something different - e.g. modally change the, uh, input focus for various UI zones (e.g. feedlist, headlines, content) and then parse same hotkeys differently with regard to which zone is currently active.

Prefixed hotkeys is something I like from good old Emacs days, but I don't care for switching input focus modally. That would require some sort of indication in the UI which zone does currently accept input and, well, the whole thing looks like a lot of clutter.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: shortcuts : add some, offer possibilities to customize them

Postby fox » 16 May 2008, 00:21

Some preliminary work in trunk:

http://bah.org.ru/images/shots/2008-05- ... dialog.png

Seems to work.

Christophe-Marie
Bear Rating Trainee
Bear Rating Trainee
Posts: 22
Joined: 09 May 2008, 21:01
Location: France
Contact:

Re: shortcuts : add some, offer possibilities to customize them

Postby Christophe-Marie » 18 May 2008, 10:07

yes! I was asking for that kind of thing :)

I thought you were proposing to implement something different - e.g. modally change the, uh, input focus for various UI zones (e.g. feedlist, headlines, content) and then parse same hotkeys differently with regard to which zone is currently active.


I think you did not misunderstood me. It is just that, I thought that was the only way to do. But actually, I see there is no need to change the active zone with those shortcuts. The fact is, I did not remember them well, that's why this help panel is very welcome :) Great job, thank you very much!

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: shortcuts : add some, offer possibilities to customize them

Postby fox » 18 May 2008, 11:49

The hotkey system has been neglected for quite some time. Thanks to you and GReader I finally came around to revamp it. :)

Current stuff: http://bah.org.ru/images/shots/2008-05-18_hk_popup.png (main) and http://bah.org.ru/images/shots/2008-05- ... _popup.png (prefs).

Christophe-Marie
Bear Rating Trainee
Bear Rating Trainee
Posts: 22
Joined: 09 May 2008, 21:01
Location: France
Contact:

Re: shortcuts : add some, offer possibilities to customize them

Postby Christophe-Marie » 18 May 2008, 12:02

When i try '?', it says

Code: Select all

Exception: ReferenceError, viewFeedGoPage is not defined
Function: hotkey_handler()
Location: functions.js?1.2.22.1:296


But I cannot find this function anywhere :

Code: Select all

/tmp/tt-rss-1.2.22.1$ grep -i -R viewFeedgoPage .
./functions.js:         viewFeedGoPage(1);
./functions.js:         viewFeedGoPage(-1);
./functions.js:         viewFeedGoPage(0);
./feedlist.js:      exception_error(e, "viewFeedGoPage");
./functions.php:         $page_prev_link = "javascript:viewFeedGoPage(-1)";
./functions.php:         $page_next_link = "javascript:viewFeedGoPage(1)";
./functions.php:         $page_first_link = "javascript:viewFeedGoPage(0)";

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: shortcuts : add some, offer possibilities to customize them

Postby fox » 18 May 2008, 14:03

Did you update everything from trunk or just some diffs? Try updating everything again, a lot of stuff is currently in flux.

For example...

Code: Select all

naboo:tt-rss% grep -i viewFeedGo *js
naboo:tt-rss%

Christophe-Marie
Bear Rating Trainee
Bear Rating Trainee
Posts: 22
Joined: 09 May 2008, 21:01
Location: France
Contact:

Re: shortcuts : add some, offer possibilities to customize them

Postby Christophe-Marie » 18 May 2008, 14:49

I think I am stupid.

I thought what you had done was in here. It is only in the developpement release, isn't it?

As I am not really in databases, I did not want to take the svn version. (you scared me with this page http://tt-rss.org/trac/wiki/DevelopmentSnapshots )

I guess I'll have to checkout a new svn version...

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: shortcuts : add some, offer possibilities to customize them

Postby fox » 18 May 2008, 15:12

Nope, 22.1 was a bugfix release way before new hotkey code was written. You can try checking out from svn (preferably from Darcs, actually) it should be safe enough or wait for the next release - it's in 3 days anyway. :)

Christophe-Marie
Bear Rating Trainee
Bear Rating Trainee
Posts: 22
Joined: 09 May 2008, 21:01
Location: France
Contact:

Re: shortcuts : add some, offer possibilities to customize them

Postby Christophe-Marie » 18 May 2008, 17:26

I'm gonna wait for the new release (I feel lazy today :) )

BTW, what plugin do you use for adding a rss feed to this forum? On which version of pbpbb? I find it very usefull, I want to propose to the webmaster of the forum of my school to do the same.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: shortcuts : add some, offer possibilities to customize them

Postby fox » 18 May 2008, 18:35

It's stock phpbb 3.x (whatever one was latest). I don't remember which rss plugin I use here (I also had to hack it a little bit), anyway here it is: rss.php.txt

Christophe-Marie
Bear Rating Trainee
Bear Rating Trainee
Posts: 22
Joined: 09 May 2008, 21:01
Location: France
Contact:

Re: shortcuts : add some, offer possibilities to customize them

Postby Christophe-Marie » 18 May 2008, 19:33

Thank you very much! I saved this code. Hope the webmaster will be ok :). It does not look harmfull (neither long), so I think there won't be any problem.

Christophe-Marie
Bear Rating Trainee
Bear Rating Trainee
Posts: 22
Joined: 09 May 2008, 21:01
Location: France
Contact:

Re: shortcuts : add some, offer possibilities to customize them

Postby Christophe-Marie » 03 Jun 2008, 22:13

Hi, thank you sooo much for the hard work on tt-rss since last time. Using tt-rss has been a really good experience since last release. I come back with user feedback and another little feature request :)

Maybe I am asking for too much, but I see a little improvement in the *new* shortcuts :)

Here is the use case :

- For now, when a category is not expanded, one can not use j/k to switch between feeds (I usually close all categories, I find it more convenient).

- What would be really good in this situation could be that tt-rss switch to the whole category feed. If you add the possibility to expand/unexpand a selected category with 'x', then you really would be able to do *anything* with the keyboard.

What do you think?

For the user feedback, I just want to say that the remaining keys of the key navigation system are really usefull. Honestly, now I think tt-rss is really the best feed reader I have experimented. I was also happy to see that I was not the only one to appreciate the feature (cf ExxonValdeez).


Return to “Feature requests”

Who is online

Users browsing this forum: No registered users and 5 guests