Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
5d127af9
Commit
5d127af9
authored
Jul 16, 2012
by
Jan Djärv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* nsterm.m (keyDown): Interpret flags without left/right bits
as the left key. Fixes: debbugs:11670
parent
01795a1b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
6 deletions
+30
-6
src/ChangeLog
src/ChangeLog
+5
-0
src/nsterm.m
src/nsterm.m
+25
-6
No files found.
src/ChangeLog
View file @
5d127af9
2012-07-16 Jan Djärv <jan.h.d@swipnet.se>
* nsterm.m (keyDown): Interpret flags without left/right bits
as the left key (Bug#11670).
2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
Remove empty and useless init functions.
...
...
src/nsterm.m
View file @
5d127af9
...
...
@@ -4720,8 +4720,13 @@ most recently updated (I guess), which is not the correct one. */
if (!processingCompose)
{
/* When using screen sharing, no left or right information is sent,
so use Left key in those cases. */
int is_left_key, is_right_key;
code = ([[theEvent charactersIgnoringModifiers] length] == 0) ?
0 : [[theEvent charactersIgnoringModifiers] characterAtIndex: 0];
/* (Carbon way: [theEvent keyCode]) */
/* is it a "function key"? */
...
...
@@ -4746,13 +4751,17 @@ most recently updated (I guess), which is not the correct one. */
if (flags & NSShiftKeyMask)
emacs_event->modifiers |= shift_modifier;
if ((flags & NSRightCommandKeyMask) == NSRightCommandKeyMask)
is_right_key = (flags & NSRightCommandKeyMask) == NSRightCommandKeyMask;
is_left_key = (flags & NSLeftCommandKeyMask) == NSLeftCommandKeyMask
|| (! is_right_key && (flags & NSCommandKeyMask) == NSCommandKeyMask);
if (is_right_key)
emacs_event->modifiers |= parse_solitary_modifier
(EQ (ns_right_command_modifier, Qleft)
? ns_command_modifier
: ns_right_command_modifier);
if (
(flags & NSLeftCommandKeyMask) == NSLeftCommandKeyMask
)
if (
is_left_key
)
{
emacs_event->modifiers |= parse_solitary_modifier
(ns_command_modifier);
...
...
@@ -4789,13 +4798,17 @@ most recently updated (I guess), which is not the correct one. */
}
}
if ((flags & NSRightControlKeyMask) == NSRightControlKeyMask)
is_right_key = (flags & NSRightControlKeyMask) == NSRightControlKeyMask;
is_left_key = (flags & NSLeftControlKeyMask) == NSLeftControlKeyMask
|| (! is_right_key && (flags & NSControlKeyMask) == NSControlKeyMask);
if (is_right_key)
emacs_event->modifiers |= parse_solitary_modifier
(EQ (ns_right_control_modifier, Qleft)
? ns_control_modifier
: ns_right_control_modifier);
if (
(flags & NSLeftControlKeyMask) == NSLeftControlKeyMask
)
if (
is_left_key
)
emacs_event->modifiers |= parse_solitary_modifier
(ns_control_modifier);
...
...
@@ -4806,7 +4819,13 @@ most recently updated (I guess), which is not the correct one. */
left_is_none = NILP (ns_alternate_modifier)
|| EQ (ns_alternate_modifier, Qnone);
if ((flags & NSRightAlternateKeyMask) == NSRightAlternateKeyMask)
is_right_key = (flags & NSRightAlternateKeyMask)
== NSRightAlternateKeyMask;
is_left_key = (flags & NSLeftAlternateKeyMask) == NSLeftAlternateKeyMask
|| (! is_right_key
&& (flags & NSAlternateKeyMask) == NSAlternateKeyMask);
if (is_right_key)
{
if ((NILP (ns_right_alternate_modifier)
|| EQ (ns_right_alternate_modifier, Qnone)
...
...
@@ -4826,7 +4845,7 @@ most recently updated (I guess), which is not the correct one. */
: ns_right_alternate_modifier);
}
if (
(flags & NSLeftAlternateKeyMask) == NSLeftAlternateKeyMask
) /* default = meta */
if (
is_left_key
) /* default = meta */
{
if (left_is_none && !fnKeysym)
{ /* accept pre-interp alt comb */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment