   }
 }
 
-void putKey(uint8_t *buf,uint8_t array[],uint8_t shiftArray[], uint8_t i, uint8_t start) {
+void putKey(uint8_t *buf,uint16_t array[],uint16_t shiftArray[], uint8_t i, uint8_t start) {
       if(buf[0] & 0x22) {
-        uint8_t t = shiftArray[buf[i]-start];
+        uint16_t t = shiftArray[buf[i]-start];
         buf[i] = purify(t);
         if(isGrr(t)) {
           buf[0] = buf[0] | GRR;

#include <usbhub.h>
#include <LiquidCrystal.h>

#define FORCE_SHIFT 0x80
#define FORCE_ALTGR 0x40
#define PURIFY 0x3F
#define LETTERS_START 0x04
#define LETTERS_END 0x1D
#define LETTERS_CNT 26

}

LiquidCrystal lcd(2,3,4,5,6,7);
uint16_t letters[LETTERS_CNT] = { 0x14, 0x1B, 0x0D, 0x08, invShift(0x36), 0x18, 0x0C, 0x07, 0x06, 0x0B, 0x17, 0x11, 0x33, 0x05, 0x15, 0x0F, 0x21, 0x13, 0x12, 0x1C, 0x0A, 0x0E, 0x10, 0x04, 0x09, 0x36};
uint16_t shiftLetters[LETTERS_CNT] = { 0x14, 0x1B, 0x0D, 0x08, 0x64, 0x18, 0x0C, 0x07, 0x06, 0x0B, 0x17, 0x11, 0x33, 0x05, 0x15, 0x0F, invShift(0x20), 0x13, 0x12, 0x1C, 0x0A, 0x0E, invShift(0x64), 0x04, 0x09, invShift(0x37)};
uint16_t numbers[NUMBERS_CNT] = {invShift(0x1E), invShift(0x1F), invShift(0x20), invShift(0x21), invShift(0x22), invShift(0x23), invShift(0x24), invShift(0x25), invShift(0x26), invShift(0x27)};
uint16_t shiftNumbers[NUMBERS_CNT] = {invShift(0x38), grr(0x27), grr(0x20), invShift(0x30), 0x34, invShift(0x2F), invShift(0x1E), invShift(0x31), invShift(0x22), invShift(0x2D)};
uint16_t specials[SPE_CNT] = {grr(0x22), grr(0x2D), invShift(0x37), 0x2E, grr(0x25), 0x32, 0x16, 0x23, grr(0x24), 0x1D, 0x19, 0x1A};
uint16_t shiftSpecials[SPE_CNT] = {grr(0x21), grr(0x2E), 0x10, 0x2E, grr(0x23), 0x32, 0x16, invShift(0x25), grr(0x1F), 0x1D, 0x19, 0x1A};

void printOnScreen(uint8_t *buf,uint8_t line) {
  for(uint8_t i = 0; i < 8; i++) {
