Class: SpectrumNetflixEmailKeyboard
- Defined in:
- lib/keyboard/stb/spectrum/spectrum_netflix_email_keyboard.rb
Constant Summary
Constants inherited from Keyboard
Instance Method Summary collapse
-
#initialize(*args) ⇒ SpectrumNetflixEmailKeyboard
constructor
A new instance of SpectrumNetflixEmailKeyboard.
Methods inherited from Keyboard
Constructor Details
#initialize(*args) ⇒ SpectrumNetflixEmailKeyboard
Returns a new instance of SpectrumNetflixEmailKeyboard.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/keyboard/stb/spectrum/spectrum_netflix_email_keyboard.rb', line 6 def initialize(*args) super(*args) # see Keyboard for explanation of layouts letters = [ %w[1 2 3 4 5 6 7 8 9 0], %w[q w e r t y u i o p], %w[a s d f g h j k l -], [:SHIFT_LOCK, :SHIFT_LOCK, 'z', 'x', 'c', 'v', 'b', 'n', 'm', '_'], [:'@gmail.com', :'@gmail.com', :'@gmail.com', :'@yahoo.com', :'@yahoo.com', :'@yahoo.com', :'@yahoo.com', :'@hotmail.com', :'@hotmail.com', :'@hotmail.com'], [:SYMBOLS, :SYMBOLS, '@', '.', '.', :'.com', :'.com', :BACKSPACE, :BACKSPACE, :BACKSPACE] ] symbols = [ %w[1 2 3 4 5 6 7 8 9 0], %w[` ~ ! @ # $ % ^ & *], %w[+ - _ { } | ' . / ?], [:'.ca', :'.ca', :'.net', :'.net', :'.edu', :'.edu', :'.org', :'.org', :'.gov', :'.gov'], [:'@gmail.com', :'@gmail.com', :'@gmail.com', :'@gmail.com', :'@yahoo.com', :'@yahoo.com', :'@hotmail.com', :'@hotmail.com', :'@hotmail.com', :'@hotmail.com'], [:LETTERS, :LETTERS, '@', '@', '.', :'.com', :BACKSPACE, :BACKSPACE, :BACKSPACE, :BACKSPACE] ] @wrap_cols = true @layouts << KeyboardLayout.new(letters, [2, 4], nav_to_key: :LETTERS, name: 'email letters') @layouts << KeyboardLayout.new(symbols, [5, 0], nav_to_key: :SYMBOLS, name: 'email symbols') # Restrict traversals to/from the multi-column keys. @deny_traversals = [ [:SHIFT_LOCK, 's'], ['s', :SHIFT_LOCK], [:'@gmail.com', 'z'], ['z', :'@gmail.com'], [:'@gmail.com', '@'], ['@', :'@gmail.com'], [:'@yahoo.com', 'x'], ['x', :'@yahoo.com'], [:'@yahoo.com', 'v'], ['v', :'@yahoo.com'], [:'@yahoo.com', 'b'], ['b', :'@yahoo.com'], [:'@yahoo.com', :'.com'], [:'.com', :'@yahoo.com'], [:'@hotmail.com', 'n'], ['n', :'@hotmail.com'], [:'@hotmail.com', '_'], ['_', :'@hotmail.com'], [:SHIFT_LOCK, 'S'], ['S', :SHIFT_LOCK], [:'@gmail.com', 'Z'], ['Z', :'@gmail.com'], [:'@yahoo.com', 'X'], ['X', :'@yahoo.com'], [:'@yahoo.com', 'V'], ['V', :'@yahoo.com'], [:'@yahoo.com', 'B'], ['B', :'@yahoo.com'], [:'@hotmail.com', 'N'], ['N', :'@hotmail.com'], [:'.ca', '-'], ['-', :'.ca'], [:'.net', '{'], ['{', :'.net'], [:'.edu', '|'], ['|', :'.edu'], [:'.org', '.'], ['.', :'.org'], [:'.gov', '?'], ['?', :'.gov'], [:'@gmail.com', :'.net'], [:'.net', :'@gmail.com'], [:'@hotmail.com', :'.org'], [:'.org', :'@hotmail.com'], ] end |