1package Firefox::Marionette::Keys;
2
3use strict;
4use warnings;
5use Exporter();
6*import = \&Exporter::import;
7our @EXPORT_OK = qw(
8  CANCEL
9  HELP
10  BACKSPACE
11  TAB
12  CLEAR
13  ENTER
14  SHIFT
15  SHIFT_LEFT
16  CONTROL
17  CONTROL_LEFT
18  ALT
19  ALT_LEFT
20  PAUSE
21  ESCAPE
22  SPACE
23  PAGE_UP
24  PAGE_DOWN
25  END_KEY
26  HOME
27  ARROW_LEFT
28  ARROW_UP
29  ARROW_RIGHT
30  ARROW_DOWN
31  INSERT
32  DELETE
33  F1
34  F2
35  F3
36  F4
37  F5
38  F6
39  F7
40  F8
41  F9
42  F10
43  F11
44  F12
45  META
46  META_LEFT
47  ZENKAKU_HANKAKU
48  SHIFT_RIGHT
49  CONTROL_RIGHT
50  ALT_RIGHT
51  META_RIGHT
52);
53
54our %EXPORT_TAGS = ( 'all' => \@EXPORT_OK, );
55
56our $VERSION = '1.10';
57
58sub CANCEL          { return chr hex '0xE001' }
59sub HELP            { return chr hex '0xE002' }
60sub BACKSPACE       { return chr hex '0xE003' }
61sub TAB             { return chr hex '0xE004' }
62sub CLEAR           { return chr hex '0xE005' }
63sub ENTER           { return chr hex '0xE006' }
64sub SHIFT           { return chr hex '0xE008' }
65sub SHIFT_LEFT      { return chr hex '0xE008' }
66sub CONTROL         { return chr hex '0xE009' }
67sub CONTROL_LEFT    { return chr hex '0xE009' }
68sub ALT             { return chr hex '0xE00A' }
69sub ALT_LEFT        { return chr hex '0xE00A' }
70sub PAUSE           { return chr hex '0xE00B' }
71sub ESCAPE          { return chr hex '0xE00C' }
72sub SPACE           { return chr hex '0xE00D' }
73sub PAGE_UP         { return chr hex '0xE00E' }
74sub PAGE_DOWN       { return chr hex '0xE00F' }
75sub END_KEY         { return chr hex '0xE010' }
76sub HOME            { return chr hex '0xE011' }
77sub ARROW_LEFT      { return chr hex '0xE012' }
78sub ARROW_UP        { return chr hex '0xE013' }
79sub ARROW_RIGHT     { return chr hex '0xE014' }
80sub ARROW_DOWN      { return chr hex '0xE015' }
81sub INSERT          { return chr hex '0xE016' }
82sub DELETE          { return chr hex '0xE017' }
83sub F1              { return chr hex '0xE031' }
84sub F2              { return chr hex '0xE032' }
85sub F3              { return chr hex '0xE033' }
86sub F4              { return chr hex '0xE034' }
87sub F5              { return chr hex '0xE035' }
88sub F6              { return chr hex '0xE036' }
89sub F7              { return chr hex '0xE037' }
90sub F8              { return chr hex '0xE038' }
91sub F9              { return chr hex '0xE039' }
92sub F10             { return chr hex '0xE03A' }
93sub F11             { return chr hex '0xE03B' }
94sub F12             { return chr hex '0xE03C' }
95sub META            { return chr hex '0xE03D' }
96sub META_LEFT       { return chr hex '0xE03D' }
97sub ZENKAKU_HANKAKU { return chr hex '0xE040' }
98sub SHIFT_RIGHT     { return chr hex '0xE050' }
99sub CONTROL_RIGHT   { return chr hex '0xE051' }
100sub ALT_RIGHT       { return chr hex '0xE052' }
101sub META_RIGHT      { return chr hex '0xE053' }
102
1031;    # Magic true value required at end of module
104__END__
105=head1 NAME
106
107Firefox::Marionette::Keys - Human readable special keys for the Marionette protocol
108
109=head1 VERSION
110
111Version 1.10
112
113=head1 SYNOPSIS
114
115    use Firefox::Marionette();
116    use Firefox::Marionette::Keys qw(:all);
117    use v5.10;
118
119    my $firefox = Firefox::Marionette->new();
120
121    $firefox->chrome()->perform(
122                                 $firefox->key_down(CONTROL()),
123                                 $firefox->key_down('l'),
124                                 $firefox->key_up('l'),
125                                 $firefox->key_up(CONTROL())
126                               )->content();
127
128=head1 DESCRIPTION
129
130This module handles the implementation of the Firefox Marionette human readable special keys
131
132=head1 SUBROUTINES/METHODS
133
134=head2 ALT
135
136returns the Alt (the same as L<ALT_LEFT|Firefox::Marionette::Keys#ALT_LEFT>) codepoint, which is 0xE00A
137
138=head2 ALT_LEFT
139
140returns the Alt Left codepoint, which is 0xE00A
141
142=head2 ALT_RIGHT
143
144returns the Alt Right codepoint, which is 0xE052
145
146=head2 ARROW_DOWN
147
148returns the Arrow Down codepoint, which is 0xE015
149
150=head2 ARROW_LEFT
151
152returns the Arrow Left codepoint, which is 0xE012
153
154=head2 ARROW_RIGHT
155
156returns the Arrow Right codepoint, which is 0xE014
157
158=head2 ARROW_UP
159
160returns the Arrow Up codepoint, which is 0xE013
161
162=head2 BACKSPACE
163
164returns the Backspace codepoint, which is 0xE003
165
166=head2 CANCEL
167
168returns the Cancel codepoint, which is 0xE001
169
170=head2 CLEAR
171
172returns the Clear codepoint, which is 0xE005
173
174=head2 CONTROL
175
176returns the Control (the same as L<CONTROL_LEFT|Firefox::Marionette::Keys#CONTROL_LEFT>) codepoint, which is 0xE009
177
178=head2 CONTROL_LEFT
179
180returns the Control Left codepoint, which is 0xE009
181
182=head2 CONTROL_RIGHT
183
184returns the Control Right codepoint, which is 0xE051
185
186=head2 DELETE
187
188returns the Delete codepoint, which is 0xE017
189
190=head2 END_KEY
191
192returns the End codepoint, which is 0xE010
193
194=head2 ENTER
195
196returns the Enter codepoint, which is 0xE006
197
198=head2 ESCAPE
199
200returns the Escape codepoint, which is 0xE00C
201
202=head2 F1
203
204returns the F1 codepoint, which is 0xE031
205
206=head2 F2
207
208returns the F2 codepoint, which is 0xE032
209
210=head2 F3
211
212returns the F3 codepoint, which is 0xE033
213
214=head2 F4
215
216returns the F4 codepoint, which is 0xE034
217
218=head2 F5
219
220returns the F5 codepoint, which is 0xE035
221
222=head2 F6
223
224returns the F6 codepoint, which is 0xE036
225
226=head2 F7
227
228returns the F7 codepoint, which is 0xE037
229
230=head2 F8
231
232returns the F8 codepoint, which is 0xE038
233
234=head2 F9
235
236returns the F9 codepoint, which is 0xE039
237
238=head2 F10
239
240returns the F10 codepoint, which is 0xE03A
241
242=head2 F11
243
244returns the F11 codepoint, which is 0xE03B
245
246=head2 F12
247
248returns the F12 codepoint, which is 0xE03C
249
250=head2 HELP
251
252returns the Help codepoint, which is 0xE002
253
254=head2 HOME
255
256returns the Home codepoint, which is 0xE011
257
258=head2 INSERT
259
260returns the Insert codepoint, which is 0xE016
261
262=head2 META
263
264returns the Meta (the same as L<META_LEFT|Firefox::Marionette::Keys#META_LEFT>) codepoint, which is 0xE03D
265
266=head2 META_LEFT
267
268returns the Meta Left codepoint, which is 0xE03D
269
270=head2 META_RIGHT
271
272returns the Meta Right codepoint, which is 0xE053
273
274=head2 PAGE_UP
275
276returns the Page Up codepoint, which is 0xE00E
277
278=head2 PAGE_DOWN
279
280returns the Page Down codepoint, which is 0xE00F
281
282=head2 PAUSE
283
284returns the Pause codepoint, which is 0xE00B
285
286=head2 SHIFT
287
288returns the Shift (the same as L<SHIFT_LEFT|Firefox::Marionette::Keys#SHIFT_LEFT>) codepoint, which is 0xE008
289
290=head2 SHIFT_LEFT
291
292returns the Shift Left codepoint, which is 0xE008
293
294=head2 SHIFT_RIGHT
295
296returns the Shift Right codepoint, which is 0xE050
297
298=head2 SPACE
299
300returns the Space codepoint, which is 0xE00D
301
302=head2 TAB
303
304returns the Tab codepoint, which is 0xE004
305
306=head2 ZENKAKU_HANKAKU
307
308returns the Zenkaku (full-width) - Hankaku (half-width) codepoint, which is 0xE040
309
310=head1 DIAGNOSTICS
311
312None.
313
314=head1 CONFIGURATION AND ENVIRONMENT
315
316Firefox::Marionette::Keys requires no configuration files or environment variables.
317
318=head1 DEPENDENCIES
319
320None.
321
322=head1 INCOMPATIBILITIES
323
324None reported.
325
326=head1 BUGS AND LIMITATIONS
327
328No bugs have been reported.
329
330Please report any bugs or feature requests to
331C<bug-firefox-marionette@rt.cpan.org>, or through the web interface at
332L<http://rt.cpan.org>.
333
334=head1 AUTHOR
335
336David Dick  C<< <ddick@cpan.org> >>
337
338=head1 LICENSE AND COPYRIGHT
339
340Copyright (c) 2021, David Dick C<< <ddick@cpan.org> >>. All rights reserved.
341
342This module is free software; you can redistribute it and/or
343modify it under the same terms as Perl itself. See L<perlartistic/perlartistic>.
344
345=head1 DISCLAIMER OF WARRANTY
346
347BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
348FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
349OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
350PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
351EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
352WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
353ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
354YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
355NECESSARY SERVICING, REPAIR, OR CORRECTION.
356
357IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
358WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
359REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
360LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
361OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
362THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
363RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
364FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
365SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
366SUCH DAMAGES.
367