1 | import Swiper from '../swiper-class';
|
2 |
|
3 | export interface KeyboardMethods {
|
4 | /**
|
5 | * Whether the keyboard control is enabled
|
6 | */
|
7 | enabled: boolean;
|
8 |
|
9 | /**
|
10 | * Enable keyboard control
|
11 | */
|
12 | enable(): void;
|
13 |
|
14 | /**
|
15 | * Disable keyboard control
|
16 | */
|
17 | disable(): void;
|
18 | }
|
19 |
|
20 | export interface KeyboardEvents {
|
21 | /**
|
22 | * Event will be fired on key press
|
23 | */
|
24 | keyPress: (swiper: Swiper, keyCode: string) => void;
|
25 | }
|
26 |
|
27 | export interface KeyboardOptions {
|
28 | /**
|
29 | * Set to `true` to enable keyboard control
|
30 | *
|
31 | * @default false
|
32 | */
|
33 | enabled?: boolean;
|
34 | /**
|
35 | * When enabled it will control sliders that are currently in viewport
|
36 | *
|
37 | * @default true
|
38 | */
|
39 | onlyInViewport?: boolean;
|
40 | /**
|
41 | * When enabled it will enable keyboard navigation by Page Up and Page Down keys
|
42 | *
|
43 | * @default true
|
44 | */
|
45 | pageUpDown?: boolean;
|
46 | }
|