1 Star 0 Fork 4

Lattice1314 / ergodox-kinesis_keyboard

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

ergodox-kinesis_keyboard

介绍

链接:原项目名叫dactyl-keyboard

输入图片说明 输入图片说明

软硬件架构

软件:基于 ergodox 固件做了修改,对dactyl媒体按键做了优化(原来的貌似不起作用)。

配列:配列使用微软的 Kinesis Advantage ,长这个样子: 输入图片说明

硬件: Teensy 2.0 (芯片型号为ATMEGA32U4)+ MCP23017 (16位IO扩展芯片 IIC控制)。

电路图如下(注意:dactyl的仓库中给出的电路图是错的,这里给出修改后的):

您可以使用MCP23017代替下图中的MCP23018(MCP23018某宝买不到,全部缺货,且价格比MCP23017贵,二者除了IIC最高速率不同外其它全部兼容),

注意 :如果您使用MCP23017,不改变程序中的硬件地址, 应将MCP23017的A2 A1 A0 地址引脚全部接地!

电路连接图 teensy2.0

软件功能及目录介绍(摘自源dactyl仓库)

  • The [makefile] (./makefile) and [build-scripts] (./build-scripts) folder in the toplevel directory are for building a collection of files for easy distribution. They are not guaranteed to work on non-Unix systems, and may be (read: are) more hackish than the stuff in [src] (./src). They help me out though.

  • [src/lib] (src/lib) is for generally useful stuff relating to the firmware. [src/lib-other] (src/lib-other) is for generally useful stuff that I didn't write myself. The TWI and USB libraries are in there, along with the files containing key press and release functions.

  • [src/keyboard] (src/keyboard) is for keyboard specific stuff. All the chip initialization code is there, along with the layout files, the software matrix to hardware matrix mapping, and hardware specific documentation.

  • [src/main.c] (src/main.c) ties it all together, and provides a few higher level functions that are useful in the key press and release functions.

  • A few concepts that might be different:

    • The layer stack

When activated, layers are pushed onto the top of a stack. When deactivated, layers are popped out from wherever they are in the stack. Layers may be active in the stack more than once. When a keypress occures, the top layer is used to determine what actions to take.

    • Keypresses are functions

Each time a key is pressed, the "press" function assigned to that key on the current layer is called. When the key is released, the "release" function (from the same layer the key was on when it was pressed) is called. These functions may do pretty much anything - from sending multiple different keypresses to the host, to changing the firmware state in some way, to activating a new layer. They may also be "transparent", i.e. execute the function assigned to the key on the layer one down from the top layer (allowing for layers that are effectively "masks" over whatever layer was active before them).

  • file 文件夹存放了模型文件。
  • image 文件夹存放了渲染后的文件。

现存问题

不支持媒体按键长按,音量加或音量减长按不会迅速增加或减小,有待优化。

编译源码

注意:编译在Linux下进行, Linux 环境下在[src]目录中进行编译,可以使用虚拟机安装Linux系统

  • 安装avr-gcc工具。
  • 在终端中导航到[src]目录(注意:不是顶级目录),然后键入make。
  • 如果一切正常, '.hex' 和 '.eep' 文件将会在 [src] 目录下生成 (这就是您当前所在的目录)。

配列修改使用说明

  • 配列模板文件:ergodox-firmware/src/keyboard/layout/qwerty-kinesis-mod.c

  • 修改const uint8_t PROGMEM _kb_layout[KB_LAYERS][KB_ROWS][KB_COLUMNS]这个三维数组即可,该数组中的按键按照空间位置(spatial positions)摆放即可, PROGMEM 是avr-gcc修饰的,表明该数组存放在flash中,KB_LAYERS是层,KB_ROWS、KB_COLUMNS分别表示某一层的行和列。

    _kb_layout这一三维数组为函数回调提供实数,所以如果要修改功能按键,还需修改const void_funptr_t PROGMEM _kb_layout_press[KB_LAYERS][KB_ROWS][KB_COLUMNS],这 是一个参与函数注册与函数回调的数组。

  • 具体的教程等有时间的时候回录制一个视频详细介绍。

空文件

简介

取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/lattice1314/ergodox-kinesis_keyboard.git
git@gitee.com:lattice1314/ergodox-kinesis_keyboard.git
lattice1314
ergodox-kinesis_keyboard
ergodox-kinesis_keyboard
master

搜索帮助