Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
6f044afc
Commit
6f044afc
authored
Jan 12, 2016
by
Craig Watson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for OSX on-screen keyboard
parent
54214f93
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
+23
-0
UBBoardController.cpp
src/board/UBBoardController.cpp
+9
-0
UBPlatformUtils.h
src/frameworks/UBPlatformUtils.h
+1
-0
UBPlatformUtils_mac.mm
src/frameworks/UBPlatformUtils_mac.mm
+13
-0
No files found.
src/board/UBBoardController.cpp
View file @
6f044afc
...
...
@@ -94,6 +94,10 @@
bool
onboardIsAlreadyRunning
=
true
;
#endif
#ifdef Q_OS_OSX
#include <QProcess>
#endif
UBBoardController
::
UBBoardController
(
UBMainWindow
*
mainWindow
)
:
UBDocumentContainer
(
mainWindow
->
centralWidget
())
,
mMainWindow
(
mainWindow
)
...
...
@@ -853,6 +857,11 @@ void UBBoardController::showKeyboard(bool show)
}
else
mPaletteManager
->
showVirtualKeyboard
(
show
);
#elif defined(Q_OS_OSX)
if
(
UBSettings
::
settings
()
->
useSystemOnScreenKeybard
->
get
().
toBool
())
UBPlatformUtils
::
showOSK
();
#else
mPaletteManager
->
showVirtualKeyboard
(
show
);
#endif
...
...
src/frameworks/UBPlatformUtils.h
View file @
6f044afc
...
...
@@ -208,6 +208,7 @@ public:
#ifdef Q_OS_OSX
static
void
SetMacLocaleByIdentifier
(
const
QString
&
id
);
static
void
showOSK
();
#endif
};
...
...
src/frameworks/UBPlatformUtils_mac.mm
View file @
6f044afc
...
...
@@ -609,3 +609,16 @@ void UBPlatformUtils::showFullScreen(QWidget *pWidget)
}
void UBPlatformUtils::showOSK()
{
[[NSAutoreleasePool alloc] init];
CFDictionaryRef properties =
(CFDictionaryRef)[NSDictionary
dictionaryWithObject: @"com.apple.KeyboardViewer"
forKey: (NSString *)kTISPropertyInputSourceID];
NSArray *sources = (NSArray *)TISCreateInputSourceList(properties, false);
TISSelectInputSource((TISInputSourceRef)[sources objectAtIndex: 0]);
}
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