MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / terminal_init_arrow

Function terminal_init_arrow

extern/editline/src/terminal.c:1002–1041  ·  view source on GitHub ↗

terminal_init_arrow(): * Initialize the arrow key bindings from termcap */

Source from the content-addressed store, hash-verified

1000 * Initialize the arrow key bindings from termcap
1001 */
1002private void
1003terminal_init_arrow(EditLine *el)
1004{
1005 funckey_t *arrow = el->el_terminal.t_fkey;
1006
1007 arrow[A_K_DN].name = STR("down");
1008 arrow[A_K_DN].key = T_kd;
1009 arrow[A_K_DN].fun.cmd = ED_NEXT_HISTORY;
1010 arrow[A_K_DN].type = XK_CMD;
1011
1012 arrow[A_K_UP].name = STR("up");
1013 arrow[A_K_UP].key = T_ku;
1014 arrow[A_K_UP].fun.cmd = ED_PREV_HISTORY;
1015 arrow[A_K_UP].type = XK_CMD;
1016
1017 arrow[A_K_LT].name = STR("left");
1018 arrow[A_K_LT].key = T_kl;
1019 arrow[A_K_LT].fun.cmd = ED_PREV_CHAR;
1020 arrow[A_K_LT].type = XK_CMD;
1021
1022 arrow[A_K_RT].name = STR("right");
1023 arrow[A_K_RT].key = T_kr;
1024 arrow[A_K_RT].fun.cmd = ED_NEXT_CHAR;
1025 arrow[A_K_RT].type = XK_CMD;
1026
1027 arrow[A_K_HO].name = STR("home");
1028 arrow[A_K_HO].key = T_kh;
1029 arrow[A_K_HO].fun.cmd = ED_MOVE_TO_BEG;
1030 arrow[A_K_HO].type = XK_CMD;
1031
1032 arrow[A_K_EN].name = STR("end");
1033 arrow[A_K_EN].key = T_at7;
1034 arrow[A_K_EN].fun.cmd = ED_MOVE_TO_END;
1035 arrow[A_K_EN].type = XK_CMD;
1036
1037 arrow[A_K_DE].name = STR("delete");
1038 arrow[A_K_DE].key = T_kD;
1039 arrow[A_K_DE].fun.cmd = ED_DELETE_NEXT_CHAR;
1040 arrow[A_K_DE].type = XK_CMD;
1041}
1042
1043
1044/* terminal_reset_arrow():

Callers 1

terminal_initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected