Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
3aed491e
Commit
3aed491e
authored
Oct 03, 2011
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: fixed handling of plus and minus keys
parent
6db9bea7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
5 deletions
+29
-5
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+14
-2
modules/gui/macosx/simple_prefs.m
modules/gui/macosx/simple_prefs.m
+15
-3
No files found.
modules/gui/macosx/intf.m
View file @
3aed491e
...
@@ -1131,12 +1131,24 @@ unsigned int CocoaKeyToVLC( unichar i_key )
...
@@ -1131,12 +1131,24 @@ unsigned int CocoaKeyToVLC( unichar i_key )
-
(
NSString
*
)
VLCKeyToString
:(
NSString
*
)
theString
-
(
NSString
*
)
VLCKeyToString
:(
NSString
*
)
theString
{
{
if
(
!
[
theString
isEqualToString
:
@""
])
{
if
(
!
[
theString
isEqualToString
:
@""
])
{
if
([
theString
characterAtIndex
:([
theString
length
]
-
1
)]
!=
0x2b
)
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"+"
withString
:
@""
];
else
{
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"+"
withString
:
@""
];
theString
=
[
NSString
stringWithFormat
:
@"%@+"
,
theString
];
}
if
([
theString
characterAtIndex
:([
theString
length
]
-
1
)]
!=
0x2d
)
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"-"
withString
:
@""
];
else
{
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"-"
withString
:
@""
];
theString
=
[
NSString
stringWithFormat
:
@"%@-"
,
theString
];
}
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"Command"
withString
:
@""
];
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"Command"
withString
:
@""
];
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"Alt"
withString
:
@""
];
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"Alt"
withString
:
@""
];
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"Shift"
withString
:
@""
];
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"Shift"
withString
:
@""
];
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"Ctrl"
withString
:
@""
];
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"Ctrl"
withString
:
@""
];
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"+"
withString
:
@""
];
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"-"
withString
:
@""
];
}
}
if
([
theString
length
]
>
1
)
if
([
theString
length
]
>
1
)
{
{
...
...
modules/gui/macosx/simple_prefs.m
View file @
3aed491e
...
@@ -79,14 +79,26 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
...
@@ -79,14 +79,26 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
-
(
NSString
*
)
OSXStringKeyToString
:(
NSString
*
)
theString
-
(
NSString
*
)
OSXStringKeyToString
:(
NSString
*
)
theString
{
{
if
(
!
[
theString
isEqualToString
:
@""
])
{
if
(
!
[
theString
isEqualToString
:
@""
])
{
/* remove cruft */
if
([
theString
characterAtIndex
:([
theString
length
]
-
1
)]
!=
0x2b
)
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"+"
withString
:
@""
];
else
{
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"+"
withString
:
@""
];
theString
=
[
NSString
stringWithFormat
:
@"%@+"
,
theString
];
}
if
([
theString
characterAtIndex
:([
theString
length
]
-
1
)]
!=
0x2d
)
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"-"
withString
:
@""
];
else
{
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"-"
withString
:
@""
];
theString
=
[
NSString
stringWithFormat
:
@"%@-"
,
theString
];
}
/* modifiers */
/* modifiers */
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"Command"
withString
:
[
NSString
stringWithUTF8String
:
"
\xE2\x8C\x98
"
]];
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"Command"
withString
:
[
NSString
stringWithUTF8String
:
"
\xE2\x8C\x98
"
]];
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"Alt"
withString
:
[
NSString
stringWithUTF8String
:
"
\xE2\x8C\xA5
"
]];
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"Alt"
withString
:
[
NSString
stringWithUTF8String
:
"
\xE2\x8C\xA5
"
]];
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"Shift"
withString
:
[
NSString
stringWithUTF8String
:
"
\xE2\x87\xA7
"
]];
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"Shift"
withString
:
[
NSString
stringWithUTF8String
:
"
\xE2\x87\xA7
"
]];
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"Ctrl"
withString
:
[
NSString
stringWithUTF8String
:
"
\xE2\x8C\x83
"
]];
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"Ctrl"
withString
:
[
NSString
stringWithUTF8String
:
"
\xE2\x8C\x83
"
]];
/* remove cruft */
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"+"
withString
:
@""
];
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"-"
withString
:
@""
];
/* show non-character keys correctly */
/* show non-character keys correctly */
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"Right"
withString
:[
NSString
stringWithUTF8String
:
"
\xE2\x86\x92
"
]];
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"Right"
withString
:[
NSString
stringWithUTF8String
:
"
\xE2\x86\x92
"
]];
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"Left"
withString
:[
NSString
stringWithUTF8String
:
"
\xE2\x86\x90
"
]];
theString
=
[
theString
stringByReplacingOccurrencesOfString
:
@"Left"
withString
:[
NSString
stringWithUTF8String
:
"
\xE2\x86\x90
"
]];
...
...
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