mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 07:50:53 +00:00
* Source/NSInputManager.m: Add binding processing code for
escape key and make list of bindings easier to extend. * KeyBindings/DefaultKeyBindings.dict: Add default escape key binding to complete: method. Patch by Marcian Lytwyn <gna@advcsi.com>. * Source/NSInputManager.m: Fixed alt behaviors for return Patch by Paul Landers <paul.landers@testplant.com>. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38918 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
486964c4e6
commit
49a39c958f
3 changed files with 25 additions and 4 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2015-08-23 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/NSInputManager.m: Add binding processing code for escape
|
||||||
|
key and make list of bindings easier to extend.
|
||||||
|
* KeyBindings/DefaultKeyBindings.dict: Add default escape key
|
||||||
|
binding to complete: method.
|
||||||
|
Patch by Marcian Lytwyn <gna@advcsi.com>.
|
||||||
|
* Source/NSInputManager.m: Fixed alt behaviors for return
|
||||||
|
Patch by Paul Landers <paul.landers@testplant.com>.
|
||||||
|
|
||||||
2015-08-21 Fred Kiefer <FredKiefer@gmx.de>
|
2015-08-21 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSMatrix.m: Remove GC ifdefs.
|
* Source/NSMatrix.m: Remove GC ifdefs.
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
{ /* -*-c-*- */
|
{ /* -*-c-*- */
|
||||||
|
/* Auto-Completion key */
|
||||||
|
"Escape" = "complete:";
|
||||||
|
|
||||||
/* Function keys */
|
/* Function keys */
|
||||||
"UpArrow" = "moveUp:";
|
"UpArrow" = "moveUp:";
|
||||||
|
|
|
@ -39,14 +39,13 @@
|
||||||
|
|
||||||
/* A table mapping character names to characters, used to interpret
|
/* A table mapping character names to characters, used to interpret
|
||||||
the character names found in KeyBindings dictionaries. */
|
the character names found in KeyBindings dictionaries. */
|
||||||
#define CHARACTER_TABLE_SIZE 78
|
|
||||||
|
|
||||||
static struct
|
static struct
|
||||||
{
|
{
|
||||||
NSString *name;
|
NSString *name;
|
||||||
unichar character;
|
unichar character;
|
||||||
}
|
}
|
||||||
character_table[CHARACTER_TABLE_SIZE] =
|
character_table[] =
|
||||||
{
|
{
|
||||||
/* Function keys. */
|
/* Function keys. */
|
||||||
{ @"UpArrow", NSUpArrowFunctionKey },
|
{ @"UpArrow", NSUpArrowFunctionKey },
|
||||||
|
@ -129,9 +128,12 @@ character_table[CHARACTER_TABLE_SIZE] =
|
||||||
{ @"Tab", NSTabCharacter },
|
{ @"Tab", NSTabCharacter },
|
||||||
{ @"Enter", NSEnterCharacter },
|
{ @"Enter", NSEnterCharacter },
|
||||||
{ @"FormFeed", NSFormFeedCharacter },
|
{ @"FormFeed", NSFormFeedCharacter },
|
||||||
{ @"CarriageReturn", NSCarriageReturnCharacter }
|
{ @"CarriageReturn", NSCarriageReturnCharacter },
|
||||||
|
{ @"Escape", 0x1b }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static int CHARACTER_TABLE_SIZE = (sizeof(character_table) / sizeof(character_table[0]));
|
||||||
|
|
||||||
static NSInputManager *currentInputManager = nil;
|
static NSInputManager *currentInputManager = nil;
|
||||||
|
|
||||||
@implementation NSInputManager
|
@implementation NSInputManager
|
||||||
|
@ -674,7 +676,14 @@ static NSInputManager *currentInputManager = nil;
|
||||||
case NSEnterCharacter:
|
case NSEnterCharacter:
|
||||||
case NSFormFeedCharacter:
|
case NSFormFeedCharacter:
|
||||||
case NSCarriageReturnCharacter:
|
case NSCarriageReturnCharacter:
|
||||||
|
if (flags & NSAlternateKeyMask)
|
||||||
|
{
|
||||||
|
[self doCommandBySelector: @selector (insertNewlineIgnoringFieldEditor:)];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
[self doCommandBySelector: @selector (insertNewline:)];
|
[self doCommandBySelector: @selector (insertNewline:)];
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NSHelpFunctionKey:
|
case NSHelpFunctionKey:
|
||||||
|
|
Loading…
Reference in a new issue