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

[desktop application] Next/Previous image with keyboard #527

Open
DanielCambray opened this issue Dec 24, 2022 · 2 comments
Open

[desktop application] Next/Previous image with keyboard #527

DanielCambray opened this issue Dec 24, 2022 · 2 comments

Comments

@DanielCambray
Copy link

Hi,

I read the doc and I don't manage to find a way to move to the next ou previous image from a keyboard key on a desktop application. Did I miss something ? Is there any current way to do it ?

Thanks.

@kparuchuri
Copy link

I used the keymap flutter library to impelment this, using this code:
KeyboardWidget(
bindings: [
KeyAction(
LogicalKeyboardKey.arrowRight,
'go to next photo',
() {
gotoNextPage();
},
),
KeyAction(
LogicalKeyboardKey.arrowLeft,
'go to previous photo',
() {
gotoPrevPage();
},
),
KeyAction(
LogicalKeyboardKey.backspace,
'go back',
() {
Navigator.of(context).pop();
},
),
],

@EArminjon
Copy link
Contributor

I used the keymap flutter library to impelment this, using this code: KeyboardWidget( bindings: [ KeyAction( LogicalKeyboardKey.arrowRight, 'go to next photo', () { gotoNextPage(); }, ), KeyAction( LogicalKeyboardKey.arrowLeft, 'go to previous photo', () { gotoPrevPage(); }, ), KeyAction( LogicalKeyboardKey.backspace, 'go back', () { Navigator.of(context).pop(); }, ), ],

Format code please.

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

No branches or pull requests

3 participants