/[weechat]/weechat/src/gui/gui-keyboard.c
ViewVC logotype

Diff of /weechat/src/gui/gui-keyboard.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by flashcode, Sat Jul 30 18:41:49 2005 UTC revision 1.6 by flashcode, Sat Sep 3 12:37:22 2005 UTC
# Line 157  gui_key_get_internal_code (char *key) Line 157  gui_key_get_internal_code (char *key)
157          result[0] = '\0';          result[0] = '\0';
158          while (key[0])          while (key[0])
159          {          {
160              if (strncasecmp (key, "meta2-", 6) == 0)              if (ascii_strncasecmp (key, "meta2-", 6) == 0)
161              {              {
162                  strcat (result, "^[[");                  strcat (result, "^[[");
163                  key += 6;                  key += 6;
164              }              }
165              if (strncasecmp (key, "meta-", 5) == 0)              if (ascii_strncasecmp (key, "meta-", 5) == 0)
166              {              {
167                  strcat (result, "^[");                  strcat (result, "^[");
168                  key += 5;                  key += 5;
169              }              }
170              else if (strncasecmp (key, "ctrl-", 5) == 0)              else if (ascii_strncasecmp (key, "ctrl-", 5) == 0)
171              {              {
172                  strcat (result, "^");                  strcat (result, "^");
173                  key += 5;                  key += 5;
# Line 200  gui_key_get_expanded_name (char *key) Line 200  gui_key_get_expanded_name (char *key)
200          result[0] = '\0';          result[0] = '\0';
201          while (key[0])          while (key[0])
202          {          {
203              if (strncasecmp (key, "^[[", 3) == 0)              if (ascii_strncasecmp (key, "^[[", 3) == 0)
204              {              {
205                  strcat (result, "meta2-");                  strcat (result, "meta2-");
206                  key += 3;                  key += 3;
207              }              }
208              if (strncasecmp (key, "^[", 2) == 0)              if (ascii_strncasecmp (key, "^[", 2) == 0)
209              {              {
210                  strcat (result, "meta-");                  strcat (result, "meta-");
211                  key += 2;                  key += 2;
# Line 239  gui_key_find_pos (t_gui_key *key) Line 239  gui_key_find_pos (t_gui_key *key)
239            
240      for (ptr_key = gui_keys; ptr_key; ptr_key = ptr_key->next_key)      for (ptr_key = gui_keys; ptr_key; ptr_key = ptr_key->next_key)
241      {      {
242          if (strcasecmp (key->key, ptr_key->key) < 0)          if (ascii_strcasecmp (key->key, ptr_key->key) < 0)
243              return ptr_key;              return ptr_key;
244      }      }
245      return NULL;      return NULL;
# Line 324  gui_key_search (char *key) Line 324  gui_key_search (char *key)
324    
325      for (ptr_key = gui_keys; ptr_key; ptr_key = ptr_key->next_key)      for (ptr_key = gui_keys; ptr_key; ptr_key = ptr_key->next_key)
326      {      {
327          if (strcasecmp (ptr_key->key, key) == 0)          if (ascii_strcasecmp (ptr_key->key, key) == 0)
328              return ptr_key;              return ptr_key;
329      }      }
330            
# Line 381  gui_key_function_search_by_name (char *n Line 381  gui_key_function_search_by_name (char *n
381      i = 0;      i = 0;
382      while (gui_key_functions[i].function_name)      while (gui_key_functions[i].function_name)
383      {      {
384          if (strcasecmp (gui_key_functions[i].function_name, name) == 0)          if (ascii_strcasecmp (gui_key_functions[i].function_name, name) == 0)
385              return gui_key_functions[i].function;              return gui_key_functions[i].function;
386          i++;          i++;
387      }      }
# Line 504  gui_key_pressed (char *key_str) Line 504  gui_key_pressed (char *key_str)
504      ptr_key = gui_key_search_part (gui_key_buffer);      ptr_key = gui_key_search_part (gui_key_buffer);
505      if (ptr_key)      if (ptr_key)
506      {      {
507          if (strcasecmp (ptr_key->key, gui_key_buffer) == 0)          if (ascii_strcasecmp (ptr_key->key, gui_key_buffer) == 0)
508          {          {
509              /* exact combo found => execute function or command */              /* exact combo found => execute function or command */
510              gui_key_buffer[0] = '\0';              gui_key_buffer[0] = '\0';

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26