Sha256: b840518a4c207898f9778860aca65fdbf47079fd9c4ff030350b59d26ac6ff6f

Contents?: true

Size: 1.05 KB

Versions: 8

Compression:

Stored size: 1.05 KB

Contents

<script>
    function capybaraFromCharCode(charCode) {
      codes = {
        8  :  ':backspace',
        9  :  ':tab',
        13 :  ':enter',
        16 :  ':shift',
        17 :  ':control',
        18 :  ':alt',
        19 :  ':pause',
        27 :  ':escape',
        // 32 :  ':space',
        33 :  ':page_up',
        34 :  ':page_down',
        35 :  ':end',
        36 :  ':home',
        37 :  ':left',
        38 :  ':up',
        39 :  ':right',
        40 :  ':down',
        45 :  ':insert',
        46 :  ':delete',
        91 :  ':command',
        112:  ':f1',
        113:  ':f2',
        114:  ':f3',
        115:  ':f4',
        116:  ':f5',
        117:  ':f6',
        118:  ':f7',
        119:  ':f8',
        120:  ':f9',
        121:  ':f10',
        122:  ':f11',
        123:  ':f12',
      }
      return codes[charCode];
    }

    function capybaraKeyUpFromCharCode(charCode) {
      codes = {
        16 :  ':shift',
        17 :  ':control',
        18 :  ':alt',
        91 :  ':command',
      }
      return codes[charCode];
    }

</script>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
magic_test-0.0.9 app/views/magic_test/_key_codes.html
magic_test-0.0.7 app/views/magic_test/_key_codes.html
magic_test-0.0.6 app/views/magic_test/_key_codes.html
magic_test-0.0.5 app/views/magic_test/_key_codes.html
magic_test-0.0.4 app/views/magic_test/_key_codes.html
magic_test-0.0.3 app/views/magic_test/_key_codes.html
magic_test-0.0.2 app/views/magic_test/_key_codes.html
magic_test-0.0.1 app/views/magic_test/_key_codes.html