aboutsummaryrefslogtreecommitdiffhomepage
path: root/input.c
diff options
context:
space:
mode:
authorGravatar liljencrantz <liljencrantz@gmail.com>2007-10-15 18:51:30 +1000
committerGravatar liljencrantz <liljencrantz@gmail.com>2007-10-15 18:51:30 +1000
commit0bea4c46e3fcfa2670534149a936481835b36a1e (patch)
tree5190339995e34ef9788f72dfc438ef56e3a0ca63 /input.c
parent0f6fe652a45ecfebcab8008dd3507cfc96ddd984 (diff)
Add very minimal fallback keybindings
darcs-hash:20071015085130-75c98-1c91b5d8cc1227f15d5de68b85af2ceadbf66e31.gz
Diffstat (limited to 'input.c')
-rw-r--r--input.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/input.c b/input.c
index edaad266..1e9a468b 100644
--- a/input.c
+++ b/input.c
@@ -339,7 +339,19 @@ int input_init()
output_set_term( env_get( L"TERM" ) );
input_terminfo_init();
-
+
+ /*
+ If we have no keybindings, add a few simple defaults
+ */
+ if( !al_get_count( &mappings ) )
+ {
+ input_mapping_add( L"", L"self-insert" );
+ input_mapping_add( L"\n", L"execute" );
+ input_mapping_add( L"\t", L"complete" );
+ input_mapping_add( L"\x3", L"commandline \"\"" );
+ input_mapping_add( L"\x4", L"exit" );
+ input_mapping_add( L"\x5", L"bind" );
+ }
return 1;
}
@@ -481,7 +493,7 @@ wint_t input_readch()
/*
Search for sequence in mapping tables
*/
-
+
while( 1 )
{
input_mapping_t *generic = 0;
@@ -519,10 +531,8 @@ wint_t input_readch()
/*
No action to take on specified character, ignore it
and move to next one.
- */
- input_common_readch( 0 );
-
- }
+ */
+ input_common_readch( 0 ); }
}
void input_mapping_get_names( array_list_t *list )