Would it work if I just replace char* with int?
Maybe. But, I doubt it.
What I think you want to do is Keyboard.print() the value as-is from the array if the "shift key" is not pressed, and after adding ('A' - 'a') to the value in the array if it is pressed.
for(int i = 0 ; i < 8; i++){
if ( (1 << i) & buttons ){
cur_char = keys[i];
if(shiftKeyPressed())
cur_char += 'A' - 'a';
Keyboard.print(cur_char);
I see no reason for cur_char or char_index in the original code, but having cur_char makes it easy to change the character that is output. char_index is still useless (as far as that snippet is concerned).
All you have to do is write the shiftKeyPressed() function to return true or false, depending on whether or not the "shift key" is pressed.