-- A Multibow template layout, useful for starting your own keymap layouts. --[[ Copyright 2019 Harald Albrecht Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]]-- local km = {} -- module local mb = require("snippets/multibow") --[[ The Keybow layout is as follows when in landscape orientation, with the USB cable going off "northwards": ┋┋ ┌╌╌╌╌┐ ┌╌╌╌╌┐ ┌╌╌╌╌┐ ┌╌╌╌╌┐ ┊ 11 ┊ ┊ 8 ┊ ┊ 7 ┊ ┊ 6 ┊ └╌╌╌╌┘ └╌╌╌╌┘ └╌╌╌╌┘ └╌╌╌╌┘ ┌╌╌╌╌┐ ┌╌╌╌╌┐ ┌╌╌╌╌┐ ┌╌╌╌╌┐ ┊ 10 ┊ ┊ 7 ┊ ┊ 4 ┊ ┊ 1 ┊ └╌╌╌╌┘ └╌╌╌╌┘ └╌╌╌╌┘ └╌╌╌╌┘ ┌╌╌╌╌┐ ┌╌╌╌╌┐ ┌╌╌╌╌┐ ┌╌╌╌╌┐ ┊ 9 ┊ ┊ 6 ┊ ┊ 3 ┊ ┊ 0 ┊ └╌╌╌╌┘ └╌╌╌╌┘ └╌╌╌╌┘ └╌╌╌╌┘ ]]-- -- Some action on a certain key press... function km.mypress(keyno) -- luacheck: ignore 212 end -- Some action on a certain key release... function km.myrelease(keyno) -- luacheck: ignore 212 end -- The keymap layout... km.keymap = { -- IMPORTANT: Make sure to change the keymap name to make it unique! name="keymap-template", -- The index entries below are defining keys as to their LED color and -- what key taps should be send to the USB host to which your Keybow is -- connected to. [0] = { c={r=1, g=1, b=1}, press=function() mb.tap("a") end}, [1] = { c={r=1, g=1, b=1}, press=km.mypress}, [2] = { c={r=1, g=1, b=1}, release=km.myrelease}, } mb.register_keymap(km.keymap) return km -- module