Giter Site home page Giter Site logo

jamesnvc / kaleidoscope-toifalone Goto Github PK

View Code? Open in Web Editor NEW
11.0 3.0 1.0 23 KB

Like Karabiner's ToIfAlone for Kaleidoscope

License: GNU General Public License v3.0

C++ 93.84% Makefile 6.16%
arduino library keyboard kaleidoscope kaleidoscope-plugin

kaleidoscope-toifalone's Introduction

Kaleidoscope-ToIfAlone

This plugin enables you to have a key that acts normally when tapped, but shifts to a layer when held in conjunction with pressing other keys. It is very similiar to DualUse, mainly differing by never timing out.

It is made to emulate the behaviour of Karabiner's ToIfAlone functionality, hence the name.

Using the plugin

Add the plugin to your available libraries by cloning it into your Arduino-Boards/libraries directory.

#include <Kaleidoscope.h>
#include <Kaleidoscope-ToIfAlone.h>

// Have an enum for layers
// or some other way of assigning numbers to layers
enum {
  _BASE,
  _NUMPAD,
};

void setup(void) {
  Kaleidoscope.use(&ToIfAlone);

  Kaleidoscope.setup();

  static kaleidoscope::ToIfAlone::KeyBinding toifalonemap[] = {
    {Key_Escape, _NUMPAD},
    TOIFALONE_MAP_END
  };
  ToIfAlone.map = toifalonemap;
}

Plugin methods

The plugin provides the ToIfAlone object, with the following property:

.map

Set the key map. This takes an array of kaleidoscope::ToIfAlone::KeyBinding objects. The last item in the array must be the special TOIFALONE_MAP_END value. Each KeyBinding objects takes the key that will be pressed and the layer that it should shift to, respectively.

By default, the map is empty.

Further reading

Starting from the example is the recommended way of getting started with the plugin.

kaleidoscope-toifalone's People

Contributors

jamesnvc avatar johnlindquist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

johnlindquist

kaleidoscope-toifalone's Issues

Typing Unicode doesn't work while holding down key

If I use this plugin to shift to a layer that has macro keys on it that use the Unicode plugin to type things, the Unicode doesn't get sent. Unicode is sent properly if switching to said layer "normally" (using a one-shot layer, in my case).

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.