dabbling with keycodes

Request new functionality here
johnnychicago
Bear Rating Trainee
Bear Rating Trainee
Posts: 36
Joined: 25 Jul 2011, 23:26

dabbling with keycodes

Postby johnnychicago » 17 Feb 2013, 16:52

Fox, others,

I used to add a few keyboard shortcuts to tt-rss.js each time after upgrading, mostly since I enjoy scrolling down and marking read just by the arrow down key (instead of the N or whatever button).

Just upgraded to 1.7.0, and tt-rss.js looks totally different. Where can I fudge keycodes now?

Thanks in advance!

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

Re: dabbling with keycodes

Postby fox » 17 Feb 2013, 17:27

You can make a plugin, see swap_jk for an example. Keycodes are written as (123), you can get the list of actions in functions.php.

btw down key does exactly that so I'm not sure what have you been modifying. :)

johnnychicago
Bear Rating Trainee
Bear Rating Trainee
Posts: 36
Joined: 25 Jul 2011, 23:26

Re: dabbling with keycodes

Postby johnnychicago » 17 Feb 2013, 17:59

Thanks fox, I'll look into the plugin.

I prefer the N action on my arrow down key - just sliding down a few pixels. The traditional arrow-down always jumps an entire article. Depending on article size, that's inconvenient.

johnnychicago
Bear Rating Trainee
Bear Rating Trainee
Posts: 36
Joined: 25 Jul 2011, 23:26

Re: dabbling with keycodes

Postby johnnychicago » 17 Feb 2013, 18:14

Done. F***' cool, thanks fox.

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

Re: dabbling with keycodes

Postby fox » 17 Feb 2013, 18:15

Yeah you can exchange the actions for N/P and arrows, which should be persistent across the newer versions. I guess this is what you did.

wladyx
Bear Rating Trainee
Bear Rating Trainee
Posts: 31
Joined: 21 Aug 2007, 12:22

Re: dabbling with keycodes

Postby wladyx » 19 Feb 2013, 19:17

I've tried using the swap_jk plugin as an example, but i had no luck.
If i edit the plugin itself everything is ok.
If i rename the folder containing the plugin, it doesn't show in the plugin list anymore.
So if i do a simple

Code: Select all

# mv swap_jk swap_jk2
the plugin does not show anymore, if i do

Code: Select all

# mv swap_jk2 swap_jk
the plugin shows itself in the list again.
Do i have to define the "new" plugin in the db or anywhere else?
Thanks for any suggestions.

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

Re: dabbling with keycodes

Postby fox » 19 Feb 2013, 19:35

you need to update the class name in init.php which corresponds to the plugin directory.

Sent from my GT-I9300 using Tapatalk 2

wladyx
Bear Rating Trainee
Bear Rating Trainee
Posts: 31
Joined: 21 Aug 2007, 12:22

Re: dabbling with keycodes

Postby wladyx » 19 Feb 2013, 19:49

Done, perfect, thanks for the quick reply.


Return to “Feature requests”

Who is online

Users browsing this forum: No registered users and 3 guests