@@ -40,21 +40,21 @@ impl InputComponent<KeyState> for TcodInputComponent {
4040 fn translate_input ( & self , key_state : KeyState ) -> KeyboardInput {
4141 let key : Key = if key_state. shift {
4242 match key_state. key {
43- self :: tcod:: Special ( tcod:: KeyCode :: Number5 ) => Key :: Printable ( '%' ) ,
44- self :: tcod:: Special ( tcod:: KeyCode :: Number6 ) => Key :: Printable ( '^' ) ,
45- self :: tcod:: Special ( tcod:: KeyCode :: Number8 ) => Key :: Printable ( '*' ) ,
46- _ => Key :: SpecialKey ( KeyCode :: None )
43+ self :: tcod:: Key :: Special ( tcod:: KeyCode :: Number5 ) => Key :: Printable ( '%' ) ,
44+ self :: tcod:: Key :: Special ( tcod:: KeyCode :: Number6 ) => Key :: Printable ( '^' ) ,
45+ self :: tcod:: Key :: Special ( tcod:: KeyCode :: Number8 ) => Key :: Printable ( '*' ) ,
46+ _ => Key :: SpecialKey ( KeyCode :: None )
4747 }
4848 } else {
4949 match key_state. key {
50- self :: tcod:: Printable ( '/' ) => Key :: Printable ( '/' ) ,
51- self :: tcod:: Special ( tcod:: KeyCode :: Up ) => Key :: SpecialKey ( KeyCode :: Up ) ,
52- self :: tcod:: Special ( tcod:: KeyCode :: Down ) => Key :: SpecialKey ( KeyCode :: Down ) ,
53- self :: tcod:: Special ( tcod:: KeyCode :: Left ) => Key :: SpecialKey ( KeyCode :: Left ) ,
54- self :: tcod:: Special ( tcod:: KeyCode :: Right ) => Key :: SpecialKey ( KeyCode :: Right ) ,
55- self :: tcod:: Special ( tcod:: KeyCode :: Shift ) => Key :: SpecialKey ( KeyCode :: Shift ) ,
56- self :: tcod:: Special ( tcod:: KeyCode :: Escape ) => Key :: SpecialKey ( KeyCode :: Escape ) ,
57- _ => Key :: SpecialKey ( KeyCode :: None )
50+ self :: tcod:: Key :: Printable ( '/' ) => Key :: Printable ( '/' ) ,
51+ self :: tcod:: Key :: Special ( tcod:: KeyCode :: Up ) => Key :: SpecialKey ( KeyCode :: Up ) ,
52+ self :: tcod:: Key :: Special ( tcod:: KeyCode :: Down ) => Key :: SpecialKey ( KeyCode :: Down ) ,
53+ self :: tcod:: Key :: Special ( tcod:: KeyCode :: Left ) => Key :: SpecialKey ( KeyCode :: Left ) ,
54+ self :: tcod:: Key :: Special ( tcod:: KeyCode :: Right ) => Key :: SpecialKey ( KeyCode :: Right ) ,
55+ self :: tcod:: Key :: Special ( tcod:: KeyCode :: Shift ) => Key :: SpecialKey ( KeyCode :: Shift ) ,
56+ self :: tcod:: Key :: Special ( tcod:: KeyCode :: Escape ) => Key :: SpecialKey ( KeyCode :: Escape ) ,
57+ _ => Key :: SpecialKey ( KeyCode :: None )
5858 }
5959 } ;
6060
0 commit comments