mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 20:50:44 +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
9d24c2a90b
commit
096c0ad2de
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>
|
||||
|
||||
* Source/NSMatrix.m: Remove GC ifdefs.
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{ /* -*-c-*- */
|
||||
/* Auto-Completion key */
|
||||
"Escape" = "complete:";
|
||||
|
||||
/* Function keys */
|
||||
"UpArrow" = "moveUp:";
|
||||
|
|
|
@ -39,14 +39,13 @@
|
|||
|
||||
/* A table mapping character names to characters, used to interpret
|
||||
the character names found in KeyBindings dictionaries. */
|
||||
#define CHARACTER_TABLE_SIZE 78
|
||||
|
||||
static struct
|
||||
{
|
||||
NSString *name;
|
||||
unichar character;
|
||||
}
|
||||
character_table[CHARACTER_TABLE_SIZE] =
|
||||
character_table[] =
|
||||
{
|
||||
/* Function keys. */
|
||||
{ @"UpArrow", NSUpArrowFunctionKey },
|
||||
|
@ -129,9 +128,12 @@ character_table[CHARACTER_TABLE_SIZE] =
|
|||
{ @"Tab", NSTabCharacter },
|
||||
{ @"Enter", NSEnterCharacter },
|
||||
{ @"FormFeed", NSFormFeedCharacter },
|
||||
{ @"CarriageReturn", NSCarriageReturnCharacter }
|
||||
{ @"CarriageReturn", NSCarriageReturnCharacter },
|
||||
{ @"Escape", 0x1b }
|
||||
};
|
||||
|
||||
static int CHARACTER_TABLE_SIZE = (sizeof(character_table) / sizeof(character_table[0]));
|
||||
|
||||
static NSInputManager *currentInputManager = nil;
|
||||
|
||||
@implementation NSInputManager
|
||||
|
@ -674,7 +676,14 @@ static NSInputManager *currentInputManager = nil;
|
|||
case NSEnterCharacter:
|
||||
case NSFormFeedCharacter:
|
||||
case NSCarriageReturnCharacter:
|
||||
[self doCommandBySelector: @selector (insertNewline:)];
|
||||
if (flags & NSAlternateKeyMask)
|
||||
{
|
||||
[self doCommandBySelector: @selector (insertNewlineIgnoringFieldEditor:)];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self doCommandBySelector: @selector (insertNewline:)];
|
||||
}
|
||||
break;
|
||||
|
||||
case NSHelpFunctionKey:
|
||||
|
|
Loading…
Reference in a new issue