question: public boolean textboxKeyTyped ( char p_146201_1_ , int p_146201_2_ ) { if ( ! isFocused ) return false ; else if ( GuiScreen . func_175278_g ( p_146201_2_ ) ) { setCursorPositionEnd ( ) ; setSelectionPos ( 0 ) ; return true ; } else if ( GuiScreen . func_175280_f ( p_146201_2_ ) ) { GuiScreen . setClipboardString ( getSelectedText ( ) ) ; return true ; } else if ( GuiScreen . func_175279_e ( p_146201_2_ ) ) { if ( isEnabled ) writeText ( GuiScreen . getClipboardString ( ) ) ; return true ; } else if ( GuiScreen . func_175277_d ( p_146201_2_ ) ) { GuiScreen . setClipboardString ( getSelectedText ( ) ) ; if ( isEnabled ) writeText ( "" ) ; return true ; } else switch ( p_146201_2_ ) { case 14 : if ( GuiScreen . isCtrlKeyDown ( ) ) { if ( isEnabled ) deleteWords ( - 1 ) ; } else if ( isEnabled ) deleteFromCursor ( - 1 ) ; return true ; case 199 : if ( GuiScreen . isShiftKeyDown ( ) ) setSelectionPos ( 0 ) ; else setCursorPositionZero ( ) ; return true ; case 203 : if ( GuiScreen . isShiftKeyDown ( ) ) { if ( GuiScreen . isCtrlKeyDown ( ) ) setSelectionPos ( getNthWordFromPos ( - 1 , getSelectionEnd ( ) ) ) ; else setSelectionPos ( getSelectionEnd ( ) - 1 ) ; } else if ( GuiScreen . isCtrlKeyDown ( ) ) setCursorPosition ( getNthWordFromCursor ( - 1 ) ) ; else moveCursorBy ( - 1 ) ; return true ; case 205 : if ( GuiScreen . isShiftKeyDown ( ) ) { if ( GuiScreen . isCtrlKeyDown ( ) ) setSelectionPos ( getNthWordFromPos ( 1 , getSelectionEnd ( ) ) ) ; else setSelectionPos ( getSelectionEnd ( ) + 1 ) ; } else if ( GuiScreen . isCtrlKeyDown ( ) ) setCursorPosition ( getNthWordFromCursor ( 1 ) ) ; else moveCursorBy ( 1 ) ; return true ; case 207 : if ( GuiScreen . isShiftKeyDown ( ) ) setSelectionPos ( text . length ( ) ) ; else setCursorPositionEnd ( ) ; return true ; case 211 : if ( GuiScreen . isCtrlKeyDown ( ) ) { if ( isEnabled ) deleteWords ( 1 ) ; } else if ( isEnabled ) deleteFromCursor ( 1 ) ; return true ; default : if ( EmailAllowedCharacters . isAllowedCharacter ( p_146201_1_ ) ) { if ( isEnabled ) writeText ( Character . toString ( p_146201_1_ ) ) ; return true ; } else return false ; } }
target:  Call this method from your GuiScreen to process the keys into the textbox