Skip to content

Commit

Permalink
#85
Browse files Browse the repository at this point in the history
  • Loading branch information
adamyg committed Sep 24, 2024
1 parent 65b058a commit 72ab452
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
21 changes: 17 additions & 4 deletions gr/keyboard.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include <edidentifier.h>
__CIDENT_RCSID(gr_keyboard_c,"$Id: keyboard.c,v 1.78 2024/09/24 12:54:15 cvsuser Exp $")
__CIDENT_RCSID(gr_keyboard_c,"$Id: keyboard.c,v 1.79 2024/09/24 15:54:16 cvsuser Exp $")

/* -*- mode: c; indent-width: 4; -*- */
/* $Id: keyboard.c,v 1.78 2024/09/24 12:54:15 cvsuser Exp $
/* $Id: keyboard.c,v 1.79 2024/09/24 15:54:16 cvsuser Exp $
* Manipulate key maps and bindings.
*
*
Expand Down Expand Up @@ -123,11 +123,13 @@ static const char * key_macro_value(const object_t *def);
static const char * key_macro_find(int key);

static char * key_to_char(char *buf, int key);
#if defined(USE_KBPROTOCOL)
static int mok2_to_key(const char *buf, unsigned buflen);
static int xterm_to_key(const char *buf, unsigned buflen);
static unsigned xterm_modifiers(unsigned mods);
static int cygwin_to_int(const char *buf);
static int msterminal_to_int(const char *buf);
#endif

static char * historyget(int idx);

Expand Down Expand Up @@ -1860,7 +1862,6 @@ void
do_key_to_int(void) /* (string key, int raw) */
{
const char *cp = get_str(1);
const int len = strlen(cp);
const int raw = get_xinteger(2, FALSE);
SPBLK *sp;

Expand All @@ -1872,6 +1873,8 @@ do_key_to_int(void) /* (string key, int raw) */
int kcode = -1;

#if defined(USE_KBPROTOCOL)
const int len = strlen(cp);

kcode = cygwin_to_int(cp);
#if defined(KBPROTOCOL_MSTERMINAL)
if (kcode <= 0) {
Expand Down Expand Up @@ -2852,6 +2855,7 @@ key_check(const char *buf, unsigned buflen, int *multi, int noambig)
}


#if defined(USE_KBPROTOCOL)
/* Function: mok2_to_key
* Decode a xterm modifyOtherKeys into our internal key-code.
*
Expand Down Expand Up @@ -2957,8 +2961,10 @@ mok2_to_key(const char *buf, unsigned buflen)
}
return -1;
}
#endif //USE_KBPROTOCOL


#if defined(USE_KBPROTOCOL)
static int
xterm_to_key(const char *buf, unsigned buflen)
{
Expand Down Expand Up @@ -3017,8 +3023,10 @@ xterm_to_key(const char *buf, unsigned buflen)
}
return -1;
}
#endif //USE_KBPROTOCOL


#if defined(USE_KBPROTOCOL)
static unsigned
xterm_modifiers(unsigned mods)
{
Expand All @@ -3035,8 +3043,10 @@ xterm_modifiers(unsigned mods)
//generally consumed by system, for example WINKEY/mintty.
return modifiers;
}
#endif //USE_KBPROTOCOL


#if defined(USE_KBPROTOCOL)
/* Function: cygwin_to_int
* Decode a cygwin specific key escape sequence into our internal key-code.
*
Expand Down Expand Up @@ -3091,8 +3101,10 @@ cygwin_to_int(const char *buf)
#endif
return -1;
}
#endif //USE_KBPROTOCOL


#if defined(USE_KBPROTOCOL)
/* Function: msterminal_to_int
* Decode a MSTerminal specific key escape sequence into our internal key-code.
*
Expand Down Expand Up @@ -3151,7 +3163,6 @@ msterminal_args(const char *buffer, unsigned arguments[])
return (args >= 1);
}


static int
msterminal_to_int(const char *buf)
{
Expand Down Expand Up @@ -3197,6 +3208,7 @@ msterminal_to_int(const char *buf)
#endif
return -1;
}
#endif //USE_KBPROTOCOL


#if defined(WIN32) || defined(__CYGWIN__)
Expand Down Expand Up @@ -4055,3 +4067,4 @@ inq_kbd_name(void) /* string ([int kbdid]) */

/*end*/


6 changes: 4 additions & 2 deletions macsrc/colors/zenburn.cr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* -*- mode: cr; indent-width: 4; -*- */
/* $Id: zenburn.cr,v 1.11 2024/08/04 11:42:44 cvsuser Exp $
/* $Id: zenburn.cr,v 1.12 2024/09/15 13:51:00 cvsuser Exp $
* zenburn coloriser, GriefEdit port.
*
* References:
Expand Down Expand Up @@ -94,7 +94,9 @@ zenburn_spec[] = {
{ 0, "Type", 187, NULL, "bold", "#dfdfbf", NULL, "bold", NULL },
{ 0, "Typedef", 253, NULL, "bold", "#dfe4cf", NULL, "bold", NULL },
{ 0, "Underlined", 188, 234, "bold", "#dcdccc", NULL, "underline", NULL },
{ 0, "VertSplit", 236, 65, NULL, "#2e3330", "#688060", NULL, NULL },
// { 0, "VertSplit", 236, 65, NULL, "#2e3330", "#688060", NULL, NULL },
{ 0, "Frame", /*GRIEF*/ 188, 237, NULL, "#2e3330", "#688060", NULL, NULL },

{ 0, "WarningMsg", 15, 236, "bold", "#ffffff", "#333333", "bold", NULL },
{ 0, "WildMenu", 236, 194, "bold", "#cbecd0", "#2c302d", "underline", NULL },

Expand Down
4 changes: 2 additions & 2 deletions macsrc/colorsvim.cr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* -*- mode: cr; indent-width: 4; -*- */
/* $Id: colorsvim.cr,v 1.4 2024/07/12 12:53:20 cvsuser Exp $
/* $Id: colorsvim.cr,v 1.5 2024/09/24 16:39:18 cvsuser Exp $
* Enhanced colour/colorscheme support.
*
*
Expand Down Expand Up @@ -126,7 +126,7 @@ static list scheme_colors = {
"=Float=", "float", // a floating constant: 2.3e10

// TODO ==> identifier
"=Identifier=", "keyword_function", // any variable name.
"=Identifier=", "keyword_definition", // any variable name.
"=Function=", "keyword_function", // function name (also: methods for classes).

"=PreProc=", "preprocessor", // preprocessor.
Expand Down

0 comments on commit 72ab452

Please sign in to comment.