Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use arrow keys as shortcuts after update to 1.14.0 #2316

Closed
thomasrenes opened this issue Apr 1, 2019 · 6 comments
Closed

Can't use arrow keys as shortcuts after update to 1.14.0 #2316

thomasrenes opened this issue Apr 1, 2019 · 6 comments
Labels
UI 🎨 User Interfaces
Milestone

Comments

@thomasrenes
Copy link
Contributor

Since the last update I'm unable to use the "left" and "right" arrow keys for browsing articles. I have set "Open the next article" to "right" and "Open the previous article" to "left" in the shortcut menu. This did work in the previous version. Other shortcuts for browsing do seem to work (tested "R"-key and "L"-key).

@Frenzie
Copy link
Member

Frenzie commented Apr 1, 2019

The keyword left was specific to the old shortcut plugin. I suspect ArrowLeft would work, but the PHP side of things currently rejects that.

/**
* This action handles the shortcut configuration page.
*
* It displays the shortcut configuration page.
* If this action is reached through a POST request, it stores all new
* configuration values then sends a notification to the user.
*
* The authorized values for shortcuts are letters (a to z), numbers (0
* to 9), function keys (f1 to f12), backspace, delete, down, end, enter,
* escape, home, insert, left, page down, page up, return, right, space,
* tab and up.
*/
public function shortcutAction() {
$list_keys = array('a', 'b', 'backspace', 'c', 'd', 'delete', 'down', 'e', 'end', 'enter',
'escape', 'f', 'g', 'h', 'home', 'i', 'insert', 'j', 'k', 'l', 'left',
'm', 'n', 'o', 'p', 'page_down', 'page_up', 'q', 'r', 'return', 'right',
's', 'space', 't', 'tab', 'u', 'up', 'v', 'w', 'x', 'y',
'z', 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9',
'f10', 'f11', 'f12', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0');
$this->view->list_keys = $list_keys;

@Alkarex Shall we add the old values to the JS or change the PHP to standard JS?

@Alkarex Alkarex added this to the 1.15.0 milestone Apr 1, 2019
@Alkarex Alkarex added the UI 🎨 User Interfaces label Apr 1, 2019
@Alkarex
Copy link
Member

Alkarex commented Apr 1, 2019

Yes, let's change the PHP code to use the standard codes such as ArrowDown, and possibly add a conversion in PHP for old configurations.

@Frenzie
Copy link
Member

Frenzie commented Apr 1, 2019

Incidentally, the standard names are defined here: https://www.w3.org/TR/uievents-key/

But it's easier to get them from a quick event catcher, e.g., here.

PageUp and PageDown also stand out as being different.

@Alkarex Alkarex modified the milestones: 1.15.0, 1.14.1 Apr 1, 2019
Alkarex added a commit to Alkarex/FreshRSS that referenced this issue Apr 1, 2019
@Alkarex
Copy link
Member

Alkarex commented Apr 1, 2019

Could you please try #2320 ?

Alkarex added a commit that referenced this issue Apr 1, 2019
@Alkarex
Copy link
Member

Alkarex commented Apr 1, 2019

Merged in the /dev branch to ease testing

@Alkarex Alkarex closed this as completed Apr 1, 2019
@thomasrenes
Copy link
Contributor Author

Merged in the /dev branch to ease testing

Thanks for the quick fix! I can confirm the arrow keys are working again for browsing on /dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI 🎨 User Interfaces
Projects
None yet
Development

No branches or pull requests

3 participants