Giter Club home page Giter Club logo

vkkeycommands's Introduction

VKKeyCommands

首先说说这个东西用在哪。我打算用在debug模式上,比如VKDebugConsoleJSPatchPlaygroundTool上,每当调试的时候需要在主要主要功能之外,加入调试功能的时候,通过模拟器的MAC键盘快捷键或者真机上摇一摇,来触发打开特殊的调试界面

  • 开启MAC键盘快捷键监听
[[VKKeyCommands sharedInstance] registerKeyCommandWithInput:@"x" modifierFlags:UIKeyModifierCommand action:^(UIKeyCommand *command) {
        NSLog(@"11");
    }];
  • 关闭MAC键盘快捷键监听
[[VKKeyCommands sharedInstance] unregisterKeyCommandWithInput:@"x" modifierFlags:UIKeyModifierCommand];
  • 开启真机摇一摇监听
    [[VKShakeCommand sharedInstance]registerShakeCommandWithAction:^{
        NSLog(@"11");
    }];
  • 关闭真机摇一摇监听
	[[VKShakeCommand sharedInstance] removeShakeCommand];

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.