【问题标题】:opening onscreen keyboard打开屏幕键盘
【发布时间】:2010-04-20 21:46:34
【问题描述】:

如何从我的应用程序中打开所有 Mac OS X 中内置的键盘查看器。

【问题讨论】:

    标签: cocoa


    【解决方案1】:

    在 10.5 及更早版本中,这里是它的路径,所以只需像往常一样启动它:

    /System/Library/Components/KeyboardViewer.component/Contents/SharedSupport/KeyboardViewerServer.app
    

    在 10.6 及更高版本上不起作用。你需要这个:http://github.com/nriley/keyboardViewer

    【讨论】:

    • 嗨,我没有通过给出路径来调用,而是找到了这个。只需调用 nsworkspace 的 launchapplication 方法,给出应用程序名称或包标识符。 [[NSWorkspace sharedWorkspace] launchAppWithBundleIdentifier:@"com.apple.KeyboardViewerServer" options:NSWorkspaceLaunchAsync additionalEventParamDescriptor:nil launchIdentifier:nil];
    猜你喜欢
    • 2015-11-20
    • 2016-12-13
    • 1970-01-01
    • 2012-08-14
    • 2015-05-31
    • 1970-01-01
    • 2014-01-20
    • 2011-12-16
    • 1970-01-01
    相关资源
    最近更新 更多