├── .gitignore ├── LICENSE ├── LICENSE-models ├── README.md ├── create-models.sh ├── pictures ├── back.jpeg ├── front.jpeg ├── front_right.jpeg ├── right_side.jpeg └── top.jpeg ├── project.clj ├── qmk └── btrfly │ ├── btrfly.c │ ├── btrfly.h │ ├── config.h │ ├── info.json │ ├── keymaps │ └── default │ │ ├── config.h │ │ └── keymap.c │ ├── readme.md │ └── rules.mk ├── right.png ├── src └── dactyl_keyboard │ └── dactyl.clj ├── tags ├── things ├── .gitkeep ├── left.scad ├── right-plate.scad ├── right-test.scad ├── right.scad ├── squish-plate.stl ├── squish.stl └── test.scad └── wiring.jpeg /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | \#*\# 3 | 4 | .repl-* 5 | .nrepl-* 6 | 7 | .lein-* 8 | *.gcode 9 | *.scad 10 | /target 11 | *.ai 12 | *.svg 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU AFFERO GENERAL PUBLIC LICENSE 2 | Version 3, 19 November 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU Affero General Public License is a free, copyleft license for 11 | software and other kinds of works, specifically designed to ensure 12 | cooperation with the community in the case of network server software. 13 | 14 | The licenses for most software and other practical works are designed 15 | to take away your freedom to share and change the works. By contrast, 16 | our General Public Licenses are intended to guarantee your freedom to 17 | share and change all versions of a program--to make sure it remains free 18 | software for all its users. 19 | 20 | When we speak of free software, we are referring to freedom, not 21 | price. Our General Public Licenses are designed to make sure that you 22 | have the freedom to distribute copies of free software (and charge for 23 | them if you wish), that you receive source code or can get it if you 24 | want it, that you can change the software or use pieces of it in new 25 | free programs, and that you know you can do these things. 26 | 27 | Developers that use our General Public Licenses protect your rights 28 | with two steps: (1) assert copyright on the software, and (2) offer 29 | you this License which gives you legal permission to copy, distribute 30 | and/or modify the software. 31 | 32 | A secondary benefit of defending all users' freedom is that 33 | improvements made in alternate versions of the program, if they 34 | receive widespread use, become available for other developers to 35 | incorporate. Many developers of free software are heartened and 36 | encouraged by the resulting cooperation. However, in the case of 37 | software used on network servers, this result may fail to come about. 38 | The GNU General Public License permits making a modified version and 39 | letting the public access it on a server without ever releasing its 40 | source code to the public. 41 | 42 | The GNU Affero General Public License is designed specifically to 43 | ensure that, in such cases, the modified source code becomes available 44 | to the community. It requires the operator of a network server to 45 | provide the source code of the modified version running there to the 46 | users of that server. Therefore, public use of a modified version, on 47 | a publicly accessible server, gives the public access to the source 48 | code of the modified version. 49 | 50 | An older license, called the Affero General Public License and 51 | published by Affero, was designed to accomplish similar goals. This is 52 | a different license, not a version of the Affero GPL, but Affero has 53 | released a new version of the Affero GPL which permits relicensing under 54 | this license. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | TERMS AND CONDITIONS 60 | 61 | 0. Definitions. 62 | 63 | "This License" refers to version 3 of the GNU Affero General Public License. 64 | 65 | "Copyright" also means copyright-like laws that apply to other kinds of 66 | works, such as semiconductor masks. 67 | 68 | "The Program" refers to any copyrightable work licensed under this 69 | License. Each licensee is addressed as "you". "Licensees" and 70 | "recipients" may be individuals or organizations. 71 | 72 | To "modify" a work means to copy from or adapt all or part of the work 73 | in a fashion requiring copyright permission, other than the making of an 74 | exact copy. The resulting work is called a "modified version" of the 75 | earlier work or a work "based on" the earlier work. 76 | 77 | A "covered work" means either the unmodified Program or a work based 78 | on the Program. 79 | 80 | To "propagate" a work means to do anything with it that, without 81 | permission, would make you directly or secondarily liable for 82 | infringement under applicable copyright law, except executing it on a 83 | computer or modifying a private copy. Propagation includes copying, 84 | distribution (with or without modification), making available to the 85 | public, and in some countries other activities as well. 86 | 87 | To "convey" a work means any kind of propagation that enables other 88 | parties to make or receive copies. Mere interaction with a user through 89 | a computer network, with no transfer of a copy, is not conveying. 90 | 91 | An interactive user interface displays "Appropriate Legal Notices" 92 | to the extent that it includes a convenient and prominently visible 93 | feature that (1) displays an appropriate copyright notice, and (2) 94 | tells the user that there is no warranty for the work (except to the 95 | extent that warranties are provided), that licensees may convey the 96 | work under this License, and how to view a copy of this License. If 97 | the interface presents a list of user commands or options, such as a 98 | menu, a prominent item in the list meets this criterion. 99 | 100 | 1. Source Code. 101 | 102 | The "source code" for a work means the preferred form of the work 103 | for making modifications to it. "Object code" means any non-source 104 | form of a work. 105 | 106 | A "Standard Interface" means an interface that either is an official 107 | standard defined by a recognized standards body, or, in the case of 108 | interfaces specified for a particular programming language, one that 109 | is widely used among developers working in that language. 110 | 111 | The "System Libraries" of an executable work include anything, other 112 | than the work as a whole, that (a) is included in the normal form of 113 | packaging a Major Component, but which is not part of that Major 114 | Component, and (b) serves only to enable use of the work with that 115 | Major Component, or to implement a Standard Interface for which an 116 | implementation is available to the public in source code form. A 117 | "Major Component", in this context, means a major essential component 118 | (kernel, window system, and so on) of the specific operating system 119 | (if any) on which the executable work runs, or a compiler used to 120 | produce the work, or an object code interpreter used to run it. 121 | 122 | The "Corresponding Source" for a work in object code form means all 123 | the source code needed to generate, install, and (for an executable 124 | work) run the object code and to modify the work, including scripts to 125 | control those activities. However, it does not include the work's 126 | System Libraries, or general-purpose tools or generally available free 127 | programs which are used unmodified in performing those activities but 128 | which are not part of the work. For example, Corresponding Source 129 | includes interface definition files associated with source files for 130 | the work, and the source code for shared libraries and dynamically 131 | linked subprograms that the work is specifically designed to require, 132 | such as by intimate data communication or control flow between those 133 | subprograms and other parts of the work. 134 | 135 | The Corresponding Source need not include anything that users 136 | can regenerate automatically from other parts of the Corresponding 137 | Source. 138 | 139 | The Corresponding Source for a work in source code form is that 140 | same work. 141 | 142 | 2. Basic Permissions. 143 | 144 | All rights granted under this License are granted for the term of 145 | copyright on the Program, and are irrevocable provided the stated 146 | conditions are met. This License explicitly affirms your unlimited 147 | permission to run the unmodified Program. The output from running a 148 | covered work is covered by this License only if the output, given its 149 | content, constitutes a covered work. This License acknowledges your 150 | rights of fair use or other equivalent, as provided by copyright law. 151 | 152 | You may make, run and propagate covered works that you do not 153 | convey, without conditions so long as your license otherwise remains 154 | in force. You may convey covered works to others for the sole purpose 155 | of having them make modifications exclusively for you, or provide you 156 | with facilities for running those works, provided that you comply with 157 | the terms of this License in conveying all material for which you do 158 | not control copyright. Those thus making or running the covered works 159 | for you must do so exclusively on your behalf, under your direction 160 | and control, on terms that prohibit them from making any copies of 161 | your copyrighted material outside their relationship with you. 162 | 163 | Conveying under any other circumstances is permitted solely under 164 | the conditions stated below. Sublicensing is not allowed; section 10 165 | makes it unnecessary. 166 | 167 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 168 | 169 | No covered work shall be deemed part of an effective technological 170 | measure under any applicable law fulfilling obligations under article 171 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 172 | similar laws prohibiting or restricting circumvention of such 173 | measures. 174 | 175 | When you convey a covered work, you waive any legal power to forbid 176 | circumvention of technological measures to the extent such circumvention 177 | is effected by exercising rights under this License with respect to 178 | the covered work, and you disclaim any intention to limit operation or 179 | modification of the work as a means of enforcing, against the work's 180 | users, your or third parties' legal rights to forbid circumvention of 181 | technological measures. 182 | 183 | 4. Conveying Verbatim Copies. 184 | 185 | You may convey verbatim copies of the Program's source code as you 186 | receive it, in any medium, provided that you conspicuously and 187 | appropriately publish on each copy an appropriate copyright notice; 188 | keep intact all notices stating that this License and any 189 | non-permissive terms added in accord with section 7 apply to the code; 190 | keep intact all notices of the absence of any warranty; and give all 191 | recipients a copy of this License along with the Program. 192 | 193 | You may charge any price or no price for each copy that you convey, 194 | and you may offer support or warranty protection for a fee. 195 | 196 | 5. Conveying Modified Source Versions. 197 | 198 | You may convey a work based on the Program, or the modifications to 199 | produce it from the Program, in the form of source code under the 200 | terms of section 4, provided that you also meet all of these conditions: 201 | 202 | a) The work must carry prominent notices stating that you modified 203 | it, and giving a relevant date. 204 | 205 | b) The work must carry prominent notices stating that it is 206 | released under this License and any conditions added under section 207 | 7. This requirement modifies the requirement in section 4 to 208 | "keep intact all notices". 209 | 210 | c) You must license the entire work, as a whole, under this 211 | License to anyone who comes into possession of a copy. This 212 | License will therefore apply, along with any applicable section 7 213 | additional terms, to the whole of the work, and all its parts, 214 | regardless of how they are packaged. This License gives no 215 | permission to license the work in any other way, but it does not 216 | invalidate such permission if you have separately received it. 217 | 218 | d) If the work has interactive user interfaces, each must display 219 | Appropriate Legal Notices; however, if the Program has interactive 220 | interfaces that do not display Appropriate Legal Notices, your 221 | work need not make them do so. 222 | 223 | A compilation of a covered work with other separate and independent 224 | works, which are not by their nature extensions of the covered work, 225 | and which are not combined with it such as to form a larger program, 226 | in or on a volume of a storage or distribution medium, is called an 227 | "aggregate" if the compilation and its resulting copyright are not 228 | used to limit the access or legal rights of the compilation's users 229 | beyond what the individual works permit. Inclusion of a covered work 230 | in an aggregate does not cause this License to apply to the other 231 | parts of the aggregate. 232 | 233 | 6. Conveying Non-Source Forms. 234 | 235 | You may convey a covered work in object code form under the terms 236 | of sections 4 and 5, provided that you also convey the 237 | machine-readable Corresponding Source under the terms of this License, 238 | in one of these ways: 239 | 240 | a) Convey the object code in, or embodied in, a physical product 241 | (including a physical distribution medium), accompanied by the 242 | Corresponding Source fixed on a durable physical medium 243 | customarily used for software interchange. 244 | 245 | b) Convey the object code in, or embodied in, a physical product 246 | (including a physical distribution medium), accompanied by a 247 | written offer, valid for at least three years and valid for as 248 | long as you offer spare parts or customer support for that product 249 | model, to give anyone who possesses the object code either (1) a 250 | copy of the Corresponding Source for all the software in the 251 | product that is covered by this License, on a durable physical 252 | medium customarily used for software interchange, for a price no 253 | more than your reasonable cost of physically performing this 254 | conveying of source, or (2) access to copy the 255 | Corresponding Source from a network server at no charge. 256 | 257 | c) Convey individual copies of the object code with a copy of the 258 | written offer to provide the Corresponding Source. This 259 | alternative is allowed only occasionally and noncommercially, and 260 | only if you received the object code with such an offer, in accord 261 | with subsection 6b. 262 | 263 | d) Convey the object code by offering access from a designated 264 | place (gratis or for a charge), and offer equivalent access to the 265 | Corresponding Source in the same way through the same place at no 266 | further charge. You need not require recipients to copy the 267 | Corresponding Source along with the object code. If the place to 268 | copy the object code is a network server, the Corresponding Source 269 | may be on a different server (operated by you or a third party) 270 | that supports equivalent copying facilities, provided you maintain 271 | clear directions next to the object code saying where to find the 272 | Corresponding Source. Regardless of what server hosts the 273 | Corresponding Source, you remain obligated to ensure that it is 274 | available for as long as needed to satisfy these requirements. 275 | 276 | e) Convey the object code using peer-to-peer transmission, provided 277 | you inform other peers where the object code and Corresponding 278 | Source of the work are being offered to the general public at no 279 | charge under subsection 6d. 280 | 281 | A separable portion of the object code, whose source code is excluded 282 | from the Corresponding Source as a System Library, need not be 283 | included in conveying the object code work. 284 | 285 | A "User Product" is either (1) a "consumer product", which means any 286 | tangible personal property which is normally used for personal, family, 287 | or household purposes, or (2) anything designed or sold for incorporation 288 | into a dwelling. In determining whether a product is a consumer product, 289 | doubtful cases shall be resolved in favor of coverage. For a particular 290 | product received by a particular user, "normally used" refers to a 291 | typical or common use of that class of product, regardless of the status 292 | of the particular user or of the way in which the particular user 293 | actually uses, or expects or is expected to use, the product. A product 294 | is a consumer product regardless of whether the product has substantial 295 | commercial, industrial or non-consumer uses, unless such uses represent 296 | the only significant mode of use of the product. 297 | 298 | "Installation Information" for a User Product means any methods, 299 | procedures, authorization keys, or other information required to install 300 | and execute modified versions of a covered work in that User Product from 301 | a modified version of its Corresponding Source. The information must 302 | suffice to ensure that the continued functioning of the modified object 303 | code is in no case prevented or interfered with solely because 304 | modification has been made. 305 | 306 | If you convey an object code work under this section in, or with, or 307 | specifically for use in, a User Product, and the conveying occurs as 308 | part of a transaction in which the right of possession and use of the 309 | User Product is transferred to the recipient in perpetuity or for a 310 | fixed term (regardless of how the transaction is characterized), the 311 | Corresponding Source conveyed under this section must be accompanied 312 | by the Installation Information. But this requirement does not apply 313 | if neither you nor any third party retains the ability to install 314 | modified object code on the User Product (for example, the work has 315 | been installed in ROM). 316 | 317 | The requirement to provide Installation Information does not include a 318 | requirement to continue to provide support service, warranty, or updates 319 | for a work that has been modified or installed by the recipient, or for 320 | the User Product in which it has been modified or installed. Access to a 321 | network may be denied when the modification itself materially and 322 | adversely affects the operation of the network or violates the rules and 323 | protocols for communication across the network. 324 | 325 | Corresponding Source conveyed, and Installation Information provided, 326 | in accord with this section must be in a format that is publicly 327 | documented (and with an implementation available to the public in 328 | source code form), and must require no special password or key for 329 | unpacking, reading or copying. 330 | 331 | 7. Additional Terms. 332 | 333 | "Additional permissions" are terms that supplement the terms of this 334 | License by making exceptions from one or more of its conditions. 335 | Additional permissions that are applicable to the entire Program shall 336 | be treated as though they were included in this License, to the extent 337 | that they are valid under applicable law. If additional permissions 338 | apply only to part of the Program, that part may be used separately 339 | under those permissions, but the entire Program remains governed by 340 | this License without regard to the additional permissions. 341 | 342 | When you convey a copy of a covered work, you may at your option 343 | remove any additional permissions from that copy, or from any part of 344 | it. (Additional permissions may be written to require their own 345 | removal in certain cases when you modify the work.) You may place 346 | additional permissions on material, added by you to a covered work, 347 | for which you have or can give appropriate copyright permission. 348 | 349 | Notwithstanding any other provision of this License, for material you 350 | add to a covered work, you may (if authorized by the copyright holders of 351 | that material) supplement the terms of this License with terms: 352 | 353 | a) Disclaiming warranty or limiting liability differently from the 354 | terms of sections 15 and 16 of this License; or 355 | 356 | b) Requiring preservation of specified reasonable legal notices or 357 | author attributions in that material or in the Appropriate Legal 358 | Notices displayed by works containing it; or 359 | 360 | c) Prohibiting misrepresentation of the origin of that material, or 361 | requiring that modified versions of such material be marked in 362 | reasonable ways as different from the original version; or 363 | 364 | d) Limiting the use for publicity purposes of names of licensors or 365 | authors of the material; or 366 | 367 | e) Declining to grant rights under trademark law for use of some 368 | trade names, trademarks, or service marks; or 369 | 370 | f) Requiring indemnification of licensors and authors of that 371 | material by anyone who conveys the material (or modified versions of 372 | it) with contractual assumptions of liability to the recipient, for 373 | any liability that these contractual assumptions directly impose on 374 | those licensors and authors. 375 | 376 | All other non-permissive additional terms are considered "further 377 | restrictions" within the meaning of section 10. If the Program as you 378 | received it, or any part of it, contains a notice stating that it is 379 | governed by this License along with a term that is a further 380 | restriction, you may remove that term. If a license document contains 381 | a further restriction but permits relicensing or conveying under this 382 | License, you may add to a covered work material governed by the terms 383 | of that license document, provided that the further restriction does 384 | not survive such relicensing or conveying. 385 | 386 | If you add terms to a covered work in accord with this section, you 387 | must place, in the relevant source files, a statement of the 388 | additional terms that apply to those files, or a notice indicating 389 | where to find the applicable terms. 390 | 391 | Additional terms, permissive or non-permissive, may be stated in the 392 | form of a separately written license, or stated as exceptions; 393 | the above requirements apply either way. 394 | 395 | 8. Termination. 396 | 397 | You may not propagate or modify a covered work except as expressly 398 | provided under this License. Any attempt otherwise to propagate or 399 | modify it is void, and will automatically terminate your rights under 400 | this License (including any patent licenses granted under the third 401 | paragraph of section 11). 402 | 403 | However, if you cease all violation of this License, then your 404 | license from a particular copyright holder is reinstated (a) 405 | provisionally, unless and until the copyright holder explicitly and 406 | finally terminates your license, and (b) permanently, if the copyright 407 | holder fails to notify you of the violation by some reasonable means 408 | prior to 60 days after the cessation. 409 | 410 | Moreover, your license from a particular copyright holder is 411 | reinstated permanently if the copyright holder notifies you of the 412 | violation by some reasonable means, this is the first time you have 413 | received notice of violation of this License (for any work) from that 414 | copyright holder, and you cure the violation prior to 30 days after 415 | your receipt of the notice. 416 | 417 | Termination of your rights under this section does not terminate the 418 | licenses of parties who have received copies or rights from you under 419 | this License. If your rights have been terminated and not permanently 420 | reinstated, you do not qualify to receive new licenses for the same 421 | material under section 10. 422 | 423 | 9. Acceptance Not Required for Having Copies. 424 | 425 | You are not required to accept this License in order to receive or 426 | run a copy of the Program. Ancillary propagation of a covered work 427 | occurring solely as a consequence of using peer-to-peer transmission 428 | to receive a copy likewise does not require acceptance. However, 429 | nothing other than this License grants you permission to propagate or 430 | modify any covered work. These actions infringe copyright if you do 431 | not accept this License. Therefore, by modifying or propagating a 432 | covered work, you indicate your acceptance of this License to do so. 433 | 434 | 10. Automatic Licensing of Downstream Recipients. 435 | 436 | Each time you convey a covered work, the recipient automatically 437 | receives a license from the original licensors, to run, modify and 438 | propagate that work, subject to this License. You are not responsible 439 | for enforcing compliance by third parties with this License. 440 | 441 | An "entity transaction" is a transaction transferring control of an 442 | organization, or substantially all assets of one, or subdividing an 443 | organization, or merging organizations. If propagation of a covered 444 | work results from an entity transaction, each party to that 445 | transaction who receives a copy of the work also receives whatever 446 | licenses to the work the party's predecessor in interest had or could 447 | give under the previous paragraph, plus a right to possession of the 448 | Corresponding Source of the work from the predecessor in interest, if 449 | the predecessor has it or can get it with reasonable efforts. 450 | 451 | You may not impose any further restrictions on the exercise of the 452 | rights granted or affirmed under this License. For example, you may 453 | not impose a license fee, royalty, or other charge for exercise of 454 | rights granted under this License, and you may not initiate litigation 455 | (including a cross-claim or counterclaim in a lawsuit) alleging that 456 | any patent claim is infringed by making, using, selling, offering for 457 | sale, or importing the Program or any portion of it. 458 | 459 | 11. Patents. 460 | 461 | A "contributor" is a copyright holder who authorizes use under this 462 | License of the Program or a work on which the Program is based. The 463 | work thus licensed is called the contributor's "contributor version". 464 | 465 | A contributor's "essential patent claims" are all patent claims 466 | owned or controlled by the contributor, whether already acquired or 467 | hereafter acquired, that would be infringed by some manner, permitted 468 | by this License, of making, using, or selling its contributor version, 469 | but do not include claims that would be infringed only as a 470 | consequence of further modification of the contributor version. For 471 | purposes of this definition, "control" includes the right to grant 472 | patent sublicenses in a manner consistent with the requirements of 473 | this License. 474 | 475 | Each contributor grants you a non-exclusive, worldwide, royalty-free 476 | patent license under the contributor's essential patent claims, to 477 | make, use, sell, offer for sale, import and otherwise run, modify and 478 | propagate the contents of its contributor version. 479 | 480 | In the following three paragraphs, a "patent license" is any express 481 | agreement or commitment, however denominated, not to enforce a patent 482 | (such as an express permission to practice a patent or covenant not to 483 | sue for patent infringement). To "grant" such a patent license to a 484 | party means to make such an agreement or commitment not to enforce a 485 | patent against the party. 486 | 487 | If you convey a covered work, knowingly relying on a patent license, 488 | and the Corresponding Source of the work is not available for anyone 489 | to copy, free of charge and under the terms of this License, through a 490 | publicly available network server or other readily accessible means, 491 | then you must either (1) cause the Corresponding Source to be so 492 | available, or (2) arrange to deprive yourself of the benefit of the 493 | patent license for this particular work, or (3) arrange, in a manner 494 | consistent with the requirements of this License, to extend the patent 495 | license to downstream recipients. "Knowingly relying" means you have 496 | actual knowledge that, but for the patent license, your conveying the 497 | covered work in a country, or your recipient's use of the covered work 498 | in a country, would infringe one or more identifiable patents in that 499 | country that you have reason to believe are valid. 500 | 501 | If, pursuant to or in connection with a single transaction or 502 | arrangement, you convey, or propagate by procuring conveyance of, a 503 | covered work, and grant a patent license to some of the parties 504 | receiving the covered work authorizing them to use, propagate, modify 505 | or convey a specific copy of the covered work, then the patent license 506 | you grant is automatically extended to all recipients of the covered 507 | work and works based on it. 508 | 509 | A patent license is "discriminatory" if it does not include within 510 | the scope of its coverage, prohibits the exercise of, or is 511 | conditioned on the non-exercise of one or more of the rights that are 512 | specifically granted under this License. You may not convey a covered 513 | work if you are a party to an arrangement with a third party that is 514 | in the business of distributing software, under which you make payment 515 | to the third party based on the extent of your activity of conveying 516 | the work, and under which the third party grants, to any of the 517 | parties who would receive the covered work from you, a discriminatory 518 | patent license (a) in connection with copies of the covered work 519 | conveyed by you (or copies made from those copies), or (b) primarily 520 | for and in connection with specific products or compilations that 521 | contain the covered work, unless you entered into that arrangement, 522 | or that patent license was granted, prior to 28 March 2007. 523 | 524 | Nothing in this License shall be construed as excluding or limiting 525 | any implied license or other defenses to infringement that may 526 | otherwise be available to you under applicable patent law. 527 | 528 | 12. No Surrender of Others' Freedom. 529 | 530 | If conditions are imposed on you (whether by court order, agreement or 531 | otherwise) that contradict the conditions of this License, they do not 532 | excuse you from the conditions of this License. If you cannot convey a 533 | covered work so as to satisfy simultaneously your obligations under this 534 | License and any other pertinent obligations, then as a consequence you may 535 | not convey it at all. For example, if you agree to terms that obligate you 536 | to collect a royalty for further conveying from those to whom you convey 537 | the Program, the only way you could satisfy both those terms and this 538 | License would be to refrain entirely from conveying the Program. 539 | 540 | 13. Remote Network Interaction; Use with the GNU General Public License. 541 | 542 | Notwithstanding any other provision of this License, if you modify the 543 | Program, your modified version must prominently offer all users 544 | interacting with it remotely through a computer network (if your version 545 | supports such interaction) an opportunity to receive the Corresponding 546 | Source of your version by providing access to the Corresponding Source 547 | from a network server at no charge, through some standard or customary 548 | means of facilitating copying of software. This Corresponding Source 549 | shall include the Corresponding Source for any work covered by version 3 550 | of the GNU General Public License that is incorporated pursuant to the 551 | following paragraph. 552 | 553 | Notwithstanding any other provision of this License, you have 554 | permission to link or combine any covered work with a work licensed 555 | under version 3 of the GNU General Public License into a single 556 | combined work, and to convey the resulting work. The terms of this 557 | License will continue to apply to the part which is the covered work, 558 | but the work with which it is combined will remain governed by version 559 | 3 of the GNU General Public License. 560 | 561 | 14. Revised Versions of this License. 562 | 563 | The Free Software Foundation may publish revised and/or new versions of 564 | the GNU Affero General Public License from time to time. Such new versions 565 | will be similar in spirit to the present version, but may differ in detail to 566 | address new problems or concerns. 567 | 568 | Each version is given a distinguishing version number. If the 569 | Program specifies that a certain numbered version of the GNU Affero General 570 | Public License "or any later version" applies to it, you have the 571 | option of following the terms and conditions either of that numbered 572 | version or of any later version published by the Free Software 573 | Foundation. If the Program does not specify a version number of the 574 | GNU Affero General Public License, you may choose any version ever published 575 | by the Free Software Foundation. 576 | 577 | If the Program specifies that a proxy can decide which future 578 | versions of the GNU Affero General Public License can be used, that proxy's 579 | public statement of acceptance of a version permanently authorizes you 580 | to choose that version for the Program. 581 | 582 | Later license versions may give you additional or different 583 | permissions. However, no additional obligations are imposed on any 584 | author or copyright holder as a result of your choosing to follow a 585 | later version. 586 | 587 | 15. Disclaimer of Warranty. 588 | 589 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 590 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 591 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 592 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 593 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 594 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 595 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 596 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 597 | 598 | 16. Limitation of Liability. 599 | 600 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 601 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 602 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 603 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 604 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 605 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 606 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 607 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 608 | SUCH DAMAGES. 609 | 610 | 17. Interpretation of Sections 15 and 16. 611 | 612 | If the disclaimer of warranty and limitation of liability provided 613 | above cannot be given local legal effect according to their terms, 614 | reviewing courts shall apply local law that most closely approximates 615 | an absolute waiver of all civil liability in connection with the 616 | Program, unless a warranty or assumption of liability accompanies a 617 | copy of the Program in return for a fee. 618 | 619 | END OF TERMS AND CONDITIONS 620 | 621 | How to Apply These Terms to Your New Programs 622 | 623 | If you develop a new program, and you want it to be of the greatest 624 | possible use to the public, the best way to achieve this is to make it 625 | free software which everyone can redistribute and change under these terms. 626 | 627 | To do so, attach the following notices to the program. It is safest 628 | to attach them to the start of each source file to most effectively 629 | state the exclusion of warranty; and each file should have at least 630 | the "copyright" line and a pointer to where the full notice is found. 631 | 632 | 633 | Copyright (C) 634 | 635 | This program is free software: you can redistribute it and/or modify 636 | it under the terms of the GNU Affero General Public License as published by 637 | the Free Software Foundation, either version 3 of the License, or 638 | (at your option) any later version. 639 | 640 | This program is distributed in the hope that it will be useful, 641 | but WITHOUT ANY WARRANTY; without even the implied warranty of 642 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 643 | GNU Affero General Public License for more details. 644 | 645 | You should have received a copy of the GNU Affero General Public License 646 | along with this program. If not, see . 647 | 648 | Also add information on how to contact you by electronic and paper mail. 649 | 650 | If your software can interact with users remotely through a computer 651 | network, you should also make sure that it provides a way for users to 652 | get its source. For example, if your program is a web application, its 653 | interface could display a "Source" link that leads users to an archive 654 | of the code. There are many ways you could offer source, and different 655 | solutions will be better for different programs; see section 13 for the 656 | specific requirements. 657 | 658 | You should also get your employer (if you work as a programmer) or school, 659 | if any, to sign a "copyright disclaimer" for the program, if necessary. 660 | For more information on this, and how to apply and follow the GNU AGPL, see 661 | . 662 | -------------------------------------------------------------------------------- /LICENSE-models: -------------------------------------------------------------------------------- 1 | Attribution-ShareAlike 4.0 International 2 | 3 | ======================================================================= 4 | 5 | Creative Commons Corporation ("Creative Commons") is not a law firm and 6 | does not provide legal services or legal advice. Distribution of 7 | Creative Commons public licenses does not create a lawyer-client or 8 | other relationship. Creative Commons makes its licenses and related 9 | information available on an "as-is" basis. Creative Commons gives no 10 | warranties regarding its licenses, any material licensed under their 11 | terms and conditions, or any related information. Creative Commons 12 | disclaims all liability for damages resulting from their use to the 13 | fullest extent possible. 14 | 15 | Using Creative Commons Public Licenses 16 | 17 | Creative Commons public licenses provide a standard set of terms and 18 | conditions that creators and other rights holders may use to share 19 | original works of authorship and other material subject to copyright 20 | and certain other rights specified in the public license below. The 21 | following considerations are for informational purposes only, are not 22 | exhaustive, and do not form part of our licenses. 23 | 24 | Considerations for licensors: Our public licenses are 25 | intended for use by those authorized to give the public 26 | permission to use material in ways otherwise restricted by 27 | copyright and certain other rights. Our licenses are 28 | irrevocable. Licensors should read and understand the terms 29 | and conditions of the license they choose before applying it. 30 | Licensors should also secure all rights necessary before 31 | applying our licenses so that the public can reuse the 32 | material as expected. Licensors should clearly mark any 33 | material not subject to the license. This includes other CC- 34 | licensed material, or material used under an exception or 35 | limitation to copyright. More considerations for licensors: 36 | wiki.creativecommons.org/Considerations_for_licensors 37 | 38 | Considerations for the public: By using one of our public 39 | licenses, a licensor grants the public permission to use the 40 | licensed material under specified terms and conditions. If 41 | the licensor's permission is not necessary for any reason--for 42 | example, because of any applicable exception or limitation to 43 | copyright--then that use is not regulated by the license. Our 44 | licenses grant only permissions under copyright and certain 45 | other rights that a licensor has authority to grant. Use of 46 | the licensed material may still be restricted for other 47 | reasons, including because others have copyright or other 48 | rights in the material. A licensor may make special requests, 49 | such as asking that all changes be marked or described. 50 | Although not required by our licenses, you are encouraged to 51 | respect those requests where reasonable. More_considerations 52 | for the public: 53 | wiki.creativecommons.org/Considerations_for_licensees 54 | 55 | ======================================================================= 56 | 57 | Creative Commons Attribution-ShareAlike 4.0 International Public 58 | License 59 | 60 | By exercising the Licensed Rights (defined below), You accept and agree 61 | to be bound by the terms and conditions of this Creative Commons 62 | Attribution-ShareAlike 4.0 International Public License ("Public 63 | License"). To the extent this Public License may be interpreted as a 64 | contract, You are granted the Licensed Rights in consideration of Your 65 | acceptance of these terms and conditions, and the Licensor grants You 66 | such rights in consideration of benefits the Licensor receives from 67 | making the Licensed Material available under these terms and 68 | conditions. 69 | 70 | 71 | Section 1 -- Definitions. 72 | 73 | a. Adapted Material means material subject to Copyright and Similar 74 | Rights that is derived from or based upon the Licensed Material 75 | and in which the Licensed Material is translated, altered, 76 | arranged, transformed, or otherwise modified in a manner requiring 77 | permission under the Copyright and Similar Rights held by the 78 | Licensor. For purposes of this Public License, where the Licensed 79 | Material is a musical work, performance, or sound recording, 80 | Adapted Material is always produced where the Licensed Material is 81 | synched in timed relation with a moving image. 82 | 83 | b. Adapter's License means the license You apply to Your Copyright 84 | and Similar Rights in Your contributions to Adapted Material in 85 | accordance with the terms and conditions of this Public License. 86 | 87 | c. BY-SA Compatible License means a license listed at 88 | creativecommons.org/compatiblelicenses, approved by Creative 89 | Commons as essentially the equivalent of this Public License. 90 | 91 | d. Copyright and Similar Rights means copyright and/or similar rights 92 | closely related to copyright including, without limitation, 93 | performance, broadcast, sound recording, and Sui Generis Database 94 | Rights, without regard to how the rights are labeled or 95 | categorized. For purposes of this Public License, the rights 96 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 97 | Rights. 98 | 99 | e. Effective Technological Measures means those measures that, in the 100 | absence of proper authority, may not be circumvented under laws 101 | fulfilling obligations under Article 11 of the WIPO Copyright 102 | Treaty adopted on December 20, 1996, and/or similar international 103 | agreements. 104 | 105 | f. Exceptions and Limitations means fair use, fair dealing, and/or 106 | any other exception or limitation to Copyright and Similar Rights 107 | that applies to Your use of the Licensed Material. 108 | 109 | g. License Elements means the license attributes listed in the name 110 | of a Creative Commons Public License. The License Elements of this 111 | Public License are Attribution and ShareAlike. 112 | 113 | h. Licensed Material means the artistic or literary work, database, 114 | or other material to which the Licensor applied this Public 115 | License. 116 | 117 | i. Licensed Rights means the rights granted to You subject to the 118 | terms and conditions of this Public License, which are limited to 119 | all Copyright and Similar Rights that apply to Your use of the 120 | Licensed Material and that the Licensor has authority to license. 121 | 122 | j. Licensor means the individual(s) or entity(ies) granting rights 123 | under this Public License. 124 | 125 | k. Share means to provide material to the public by any means or 126 | process that requires permission under the Licensed Rights, such 127 | as reproduction, public display, public performance, distribution, 128 | dissemination, communication, or importation, and to make material 129 | available to the public including in ways that members of the 130 | public may access the material from a place and at a time 131 | individually chosen by them. 132 | 133 | l. Sui Generis Database Rights means rights other than copyright 134 | resulting from Directive 96/9/EC of the European Parliament and of 135 | the Council of 11 March 1996 on the legal protection of databases, 136 | as amended and/or succeeded, as well as other essentially 137 | equivalent rights anywhere in the world. 138 | 139 | m. You means the individual or entity exercising the Licensed Rights 140 | under this Public License. Your has a corresponding meaning. 141 | 142 | 143 | Section 2 -- Scope. 144 | 145 | a. License grant. 146 | 147 | 1. Subject to the terms and conditions of this Public License, 148 | the Licensor hereby grants You a worldwide, royalty-free, 149 | non-sublicensable, non-exclusive, irrevocable license to 150 | exercise the Licensed Rights in the Licensed Material to: 151 | 152 | a. reproduce and Share the Licensed Material, in whole or 153 | in part; and 154 | 155 | b. produce, reproduce, and Share Adapted Material. 156 | 157 | 2. Exceptions and Limitations. For the avoidance of doubt, where 158 | Exceptions and Limitations apply to Your use, this Public 159 | License does not apply, and You do not need to comply with 160 | its terms and conditions. 161 | 162 | 3. Term. The term of this Public License is specified in Section 163 | 6(a). 164 | 165 | 4. Media and formats; technical modifications allowed. The 166 | Licensor authorizes You to exercise the Licensed Rights in 167 | all media and formats whether now known or hereafter created, 168 | and to make technical modifications necessary to do so. The 169 | Licensor waives and/or agrees not to assert any right or 170 | authority to forbid You from making technical modifications 171 | necessary to exercise the Licensed Rights, including 172 | technical modifications necessary to circumvent Effective 173 | Technological Measures. For purposes of this Public License, 174 | simply making modifications authorized by this Section 2(a) 175 | (4) never produces Adapted Material. 176 | 177 | 5. Downstream recipients. 178 | 179 | a. Offer from the Licensor -- Licensed Material. Every 180 | recipient of the Licensed Material automatically 181 | receives an offer from the Licensor to exercise the 182 | Licensed Rights under the terms and conditions of this 183 | Public License. 184 | 185 | b. Additional offer from the Licensor -- Adapted Material. 186 | Every recipient of Adapted Material from You 187 | automatically receives an offer from the Licensor to 188 | exercise the Licensed Rights in the Adapted Material 189 | under the conditions of the Adapter's License You apply. 190 | 191 | c. No downstream restrictions. You may not offer or impose 192 | any additional or different terms or conditions on, or 193 | apply any Effective Technological Measures to, the 194 | Licensed Material if doing so restricts exercise of the 195 | Licensed Rights by any recipient of the Licensed 196 | Material. 197 | 198 | 6. No endorsement. Nothing in this Public License constitutes or 199 | may be construed as permission to assert or imply that You 200 | are, or that Your use of the Licensed Material is, connected 201 | with, or sponsored, endorsed, or granted official status by, 202 | the Licensor or others designated to receive attribution as 203 | provided in Section 3(a)(1)(A)(i). 204 | 205 | b. Other rights. 206 | 207 | 1. Moral rights, such as the right of integrity, are not 208 | licensed under this Public License, nor are publicity, 209 | privacy, and/or other similar personality rights; however, to 210 | the extent possible, the Licensor waives and/or agrees not to 211 | assert any such rights held by the Licensor to the limited 212 | extent necessary to allow You to exercise the Licensed 213 | Rights, but not otherwise. 214 | 215 | 2. Patent and trademark rights are not licensed under this 216 | Public License. 217 | 218 | 3. To the extent possible, the Licensor waives any right to 219 | collect royalties from You for the exercise of the Licensed 220 | Rights, whether directly or through a collecting society 221 | under any voluntary or waivable statutory or compulsory 222 | licensing scheme. In all other cases the Licensor expressly 223 | reserves any right to collect such royalties. 224 | 225 | 226 | Section 3 -- License Conditions. 227 | 228 | Your exercise of the Licensed Rights is expressly made subject to the 229 | following conditions. 230 | 231 | a. Attribution. 232 | 233 | 1. If You Share the Licensed Material (including in modified 234 | form), You must: 235 | 236 | a. retain the following if it is supplied by the Licensor 237 | with the Licensed Material: 238 | 239 | i. identification of the creator(s) of the Licensed 240 | Material and any others designated to receive 241 | attribution, in any reasonable manner requested by 242 | the Licensor (including by pseudonym if 243 | designated); 244 | 245 | ii. a copyright notice; 246 | 247 | iii. a notice that refers to this Public License; 248 | 249 | iv. a notice that refers to the disclaimer of 250 | warranties; 251 | 252 | v. a URI or hyperlink to the Licensed Material to the 253 | extent reasonably practicable; 254 | 255 | b. indicate if You modified the Licensed Material and 256 | retain an indication of any previous modifications; and 257 | 258 | c. indicate the Licensed Material is licensed under this 259 | Public License, and include the text of, or the URI or 260 | hyperlink to, this Public License. 261 | 262 | 2. You may satisfy the conditions in Section 3(a)(1) in any 263 | reasonable manner based on the medium, means, and context in 264 | which You Share the Licensed Material. For example, it may be 265 | reasonable to satisfy the conditions by providing a URI or 266 | hyperlink to a resource that includes the required 267 | information. 268 | 269 | 3. If requested by the Licensor, You must remove any of the 270 | information required by Section 3(a)(1)(A) to the extent 271 | reasonably practicable. 272 | 273 | b. ShareAlike. 274 | 275 | In addition to the conditions in Section 3(a), if You Share 276 | Adapted Material You produce, the following conditions also apply. 277 | 278 | 1. The Adapter's License You apply must be a Creative Commons 279 | license with the same License Elements, this version or 280 | later, or a BY-SA Compatible License. 281 | 282 | 2. You must include the text of, or the URI or hyperlink to, the 283 | Adapter's License You apply. You may satisfy this condition 284 | in any reasonable manner based on the medium, means, and 285 | context in which You Share Adapted Material. 286 | 287 | 3. You may not offer or impose any additional or different terms 288 | or conditions on, or apply any Effective Technological 289 | Measures to, Adapted Material that restrict exercise of the 290 | rights granted under the Adapter's License You apply. 291 | 292 | 293 | Section 4 -- Sui Generis Database Rights. 294 | 295 | Where the Licensed Rights include Sui Generis Database Rights that 296 | apply to Your use of the Licensed Material: 297 | 298 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 299 | to extract, reuse, reproduce, and Share all or a substantial 300 | portion of the contents of the database; 301 | 302 | b. if You include all or a substantial portion of the database 303 | contents in a database in which You have Sui Generis Database 304 | Rights, then the database in which You have Sui Generis Database 305 | Rights (but not its individual contents) is Adapted Material, 306 | 307 | including for purposes of Section 3(b); and 308 | c. You must comply with the conditions in Section 3(a) if You Share 309 | all or a substantial portion of the contents of the database. 310 | 311 | For the avoidance of doubt, this Section 4 supplements and does not 312 | replace Your obligations under this Public License where the Licensed 313 | Rights include other Copyright and Similar Rights. 314 | 315 | 316 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 317 | 318 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 319 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 320 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 321 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 322 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 323 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 324 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 325 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 326 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 327 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 328 | 329 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 330 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 331 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 332 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 333 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 334 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 335 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 336 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 337 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 338 | 339 | c. The disclaimer of warranties and limitation of liability provided 340 | above shall be interpreted in a manner that, to the extent 341 | possible, most closely approximates an absolute disclaimer and 342 | waiver of all liability. 343 | 344 | 345 | Section 6 -- Term and Termination. 346 | 347 | a. This Public License applies for the term of the Copyright and 348 | Similar Rights licensed here. However, if You fail to comply with 349 | this Public License, then Your rights under this Public License 350 | terminate automatically. 351 | 352 | b. Where Your right to use the Licensed Material has terminated under 353 | Section 6(a), it reinstates: 354 | 355 | 1. automatically as of the date the violation is cured, provided 356 | it is cured within 30 days of Your discovery of the 357 | violation; or 358 | 359 | 2. upon express reinstatement by the Licensor. 360 | 361 | For the avoidance of doubt, this Section 6(b) does not affect any 362 | right the Licensor may have to seek remedies for Your violations 363 | of this Public License. 364 | 365 | c. For the avoidance of doubt, the Licensor may also offer the 366 | Licensed Material under separate terms or conditions or stop 367 | distributing the Licensed Material at any time; however, doing so 368 | will not terminate this Public License. 369 | 370 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 371 | License. 372 | 373 | 374 | Section 7 -- Other Terms and Conditions. 375 | 376 | a. The Licensor shall not be bound by any additional or different 377 | terms or conditions communicated by You unless expressly agreed. 378 | 379 | b. Any arrangements, understandings, or agreements regarding the 380 | Licensed Material not stated herein are separate from and 381 | independent of the terms and conditions of this Public License. 382 | 383 | 384 | Section 8 -- Interpretation. 385 | 386 | a. For the avoidance of doubt, this Public License does not, and 387 | shall not be interpreted to, reduce, limit, restrict, or impose 388 | conditions on any use of the Licensed Material that could lawfully 389 | be made without permission under this Public License. 390 | 391 | b. To the extent possible, if any provision of this Public License is 392 | deemed unenforceable, it shall be automatically reformed to the 393 | minimum extent necessary to make it enforceable. If the provision 394 | cannot be reformed, it shall be severed from this Public License 395 | without affecting the enforceability of the remaining terms and 396 | conditions. 397 | 398 | c. No term or condition of this Public License will be waived and no 399 | failure to comply consented to unless expressly agreed to by the 400 | Licensor. 401 | 402 | d. Nothing in this Public License constitutes or may be interpreted 403 | as a limitation upon, or waiver of, any privileges and immunities 404 | that apply to the Licensor or You, including from the legal 405 | processes of any jurisdiction or authority. 406 | 407 | 408 | ======================================================================= 409 | 410 | Creative Commons is not a party to its public 411 | licenses. Notwithstanding, Creative Commons may elect to apply one of 412 | its public licenses to material it publishes and in those instances 413 | will be considered the “Licensor.” The text of the Creative Commons 414 | public licenses is dedicated to the public domain under the CC0 Public 415 | Domain Dedication. Except for the limited purpose of indicating that 416 | material is shared under a Creative Commons public license or as 417 | otherwise permitted by the Creative Commons policies published at 418 | creativecommons.org/policies, Creative Commons does not authorize the 419 | use of the trademark "Creative Commons" or any other trademark or logo 420 | of Creative Commons without its prior written consent including, 421 | without limitation, in connection with any unauthorized modifications 422 | to any of its public licenses or any other arrangements, 423 | understandings, or agreements concerning use of licensed material. For 424 | the avoidance of doubt, this paragraph does not form part of the 425 | public licenses. 426 | 427 | Creative Commons may be contacted at creativecommons.org. 428 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # btrfly 2 | 3 | ![render](right.png) 4 | 5 | ![assembled](pictures/top.jpeg) 6 | 7 | more pictures in `pictures` 8 | 9 | This is a fork of the [Dactyl-ManuForm](https://github.com/tshort/dactyl-keyboard). The Dactyl-Manuform is a fork of the [Dactyl](https://github.com/adereth/dactyl-keyboard) with the thumb cluster from [ManuForm](https://github.com/jeffgran/ManuForm). 10 | 11 | 12 | ## Wiring 13 | 14 | No "pretty" diagram for now, but there is an ugly hand drawn schematic. see `wiring.jpeg` 15 | 16 | The schematic is from the perspective of the underside of the keyboard. 17 | 18 | Most of the "usual" dactyl wiring rules apply here. 19 | 20 | ProMicro Pinout 21 | ``` 22 | C = colomn 23 | R = Row 24 | 25 | C0 = D3 USB RAW 26 | C1 = D2 GND 27 | GND RST 28 | GND VCC 29 | C2 = D1 F4 30 | C3 = D0 F5 31 | C4 = D4 F6 32 | C5 = C6 F7 = R0 33 | C6 = D7 B1 = R1 34 | C7 = E6 B3 = R2 35 | C8 = B4 B2 = R3 36 | C9 = B5 B6 = R4 37 | ``` 38 | 39 | ## Build QMK 40 | copy qmk/microdactyl to a new qmk checkout, under the keybaords/handwired directory 41 | ``` 42 | cp -a qmk/btrfly $QMK_DIR/keyboards/handwired/ 43 | ``` 44 | then flash by running the following from your qmk checkout 45 | ``` 46 | make handwired/btrfly:default:flash 47 | ``` 48 | 49 | ## Features 50 | 51 | - dactyl-manuform-mini thumb cluster 52 | - flat, tented qwerty keys 53 | - 4 extra mappable keys 54 | 55 | ## Generate OpenSCAD and STL models 56 | 57 | * Run `lein generate` or `lein auto generate` 58 | * This will regenerate the `things/*.scad` files 59 | * Use OpenSCAD to open a `.scad` file. 60 | * Make changes to design, repeat `load-file`, OpenSCAD will watch for changes and rerender. 61 | * When done, use OpenSCAD to export STL files 62 | 63 | 64 | * NOTE: in the code, the btrfly keyboard is sometimes called "squish" 65 | 66 | ## In the wild 67 | https://old.reddit.com/r/ErgoMechKeyboards/comments/nozw1c/btrfly_with_kissboard_configuration_my_first_diy/ 68 | 69 | ## License 70 | 71 | Copyright © 2021 Hal Emmerich 72 | Copyright © 2015-2018 Matthew Adereth, Tom Short and Leo Lou 73 | 74 | The source code for generating the models is distributed under the [GNU AFFERO GENERAL PUBLIC LICENSE Version 3](LICENSE). 75 | 76 | The generated models are distributed under the [Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)](LICENSE-models). 77 | -------------------------------------------------------------------------------- /create-models.sh: -------------------------------------------------------------------------------- 1 | lein run src/dactyl_keyboard/dactyl.clj 2 | cp things/right.scad things/right-4x5.scad 3 | cp things/left.scad things/left-4x5.scad 4 | cp things/right-plate.scad things/right-4x5-plate.scad 5 | openscad -o things/right-4x5-plate.dxf things/right-4x5-plate.scad >/dev/null 2>&1 & 6 | openscad -o things/right-4x5.stl things/right-4x5.scad >/dev/null 2>&1 & 7 | openscad -o things/left-4x5.stl things/left-4x5.scad >/dev/null 2>&1 & 8 | 9 | patch -p1 < 4x6.patch 10 | lein run src/dactyl_keyboard/dactyl.clj 11 | cp things/right.scad things/right-4x6.scad 12 | cp things/left.scad things/left-4x6.scad 13 | cp things/right-plate.scad things/right-4x6-plate.scad 14 | openscad -o things/right-4x6-plate.dxf things/right-4x6-plate.scad >/dev/null 2>&1 & 15 | openscad -o things/right-4x6.stl things/right-4x6.scad >/dev/null 2>&1 & 16 | openscad -o things/left-4x6.stl things/left-4x6.scad >/dev/null 2>&1 & 17 | git checkout src/dactyl_keyboard/dactyl.clj 18 | 19 | patch -p1 < 5x6.patch 20 | lein run src/dactyl_keyboard/dactyl.clj 21 | cp things/right.scad things/right-5x6.scad 22 | cp things/left.scad things/left-5x6.scad 23 | cp things/right-plate.scad things/right-5x6-plate.scad 24 | openscad -o things/right-5x6-plate.dxf things/right-5x6-plate.scad >/dev/null 2>&1 & 25 | openscad -o things/right-5x6.stl things/right-5x6.scad >/dev/null 2>&1 & 26 | openscad -o things/left-5x6.stl things/left-5x6.scad >/dev/null 2>&1 & 27 | git checkout src/dactyl_keyboard/dactyl.clj 28 | 29 | patch -p1 < 6x6.patch 30 | lein run src/dactyl_keyboard/dactyl.clj 31 | cp things/right.scad things/right-6x6.scad 32 | cp things/left.scad things/left-6x6.scad 33 | cp things/right-plate.scad things/right-6x6-plate.scad 34 | openscad -o things/right-6x6-plate.dxf things/right-6x6-plate.scad >/dev/null 2>&1 & 35 | openscad -o things/right-6x6.stl things/right-6x6.scad >/dev/null 2>&1 & 36 | openscad -o things/left-6x6.stl things/left-6x6.scad >/dev/null 2>&1 & 37 | git checkout src/dactyl_keyboard/dactyl.clj 38 | 39 | 40 | # git add things/*-4x5.stl 41 | # git add things/right-4x5-plate.dxf 42 | # git commit -m "Add CAD files" 43 | wait -------------------------------------------------------------------------------- /pictures/back.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SolidHal/btrfly-keyboard/ffd352c1231df5dd64ccd41f1b3cddc41a128a04/pictures/back.jpeg -------------------------------------------------------------------------------- /pictures/front.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SolidHal/btrfly-keyboard/ffd352c1231df5dd64ccd41f1b3cddc41a128a04/pictures/front.jpeg -------------------------------------------------------------------------------- /pictures/front_right.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SolidHal/btrfly-keyboard/ffd352c1231df5dd64ccd41f1b3cddc41a128a04/pictures/front_right.jpeg -------------------------------------------------------------------------------- /pictures/right_side.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SolidHal/btrfly-keyboard/ffd352c1231df5dd64ccd41f1b3cddc41a128a04/pictures/right_side.jpeg -------------------------------------------------------------------------------- /pictures/top.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SolidHal/btrfly-keyboard/ffd352c1231df5dd64ccd41f1b3cddc41a128a04/pictures/top.jpeg -------------------------------------------------------------------------------- /project.clj: -------------------------------------------------------------------------------- 1 | (defproject dactyl-keyboard "0.1.0-SNAPSHOT" 2 | :description "A parametrized, split-hand, concave, columnar, erogonomic keyboard" 3 | :url "http://example.com/FIXME" 4 | :main dactyl-keyboard.dactyl 5 | :license {:name "Eclipse Public License" 6 | :url "http://www.eclipse.org/legal/epl-v10.html"} 7 | :plugins [[lein-auto "0.1.3"] 8 | [lein-exec "0.3.7"]] 9 | :aliases {"generate" ["exec" "-p" "src/dactyl_keyboard/dactyl.clj"]} 10 | :dependencies [[org.clojure/clojure "1.7.0"] 11 | [unicode-math "0.2.0"] 12 | [scad-clj "0.4.0"]]) 13 | 14 | 15 | -------------------------------------------------------------------------------- /qmk/btrfly/btrfly.c: -------------------------------------------------------------------------------- 1 | #include "btrfly.h" 2 | 3 | 4 | #ifdef SSD1306OLED 5 | void led_set_kb(uint8_t usb_led) { 6 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here 7 | led_set_user(usb_led); 8 | } 9 | #endif 10 | 11 | void matrix_init_kb(void) { 12 | matrix_init_user(); 13 | }; 14 | -------------------------------------------------------------------------------- /qmk/btrfly/btrfly.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "quantum.h" 4 | 5 | #ifdef USE_I2C 6 | #include 7 | #ifdef __AVK__ 8 | #include 9 | #include 10 | #endif 11 | #endif 12 | 13 | #define LAYOUT(\ 14 | K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, \ 15 | K11, K12, K13, K14, K15, K16, K17, K18, K19, K20, \ 16 | K21, K22, K23, K24, K25, K26, K27, K28, K29, K30, \ 17 | K31, K32, K35, K36, \ 18 | K33, K34, \ 19 | K40, K41, K42, K43, \ 20 | K44, K45, K46, K47 \ 21 | ) \ 22 | { \ 23 | { K01, K02, K03, K04, K05, K06, K07, K08, K09, K10 }, \ 24 | { K11, K12, K13, K14, K15, K16, K17, K18, K19, K20 }, \ 25 | { K21, K22, K23, K24, K25, K26, K27, K28, K29, K30 }, \ 26 | { KC_NO, K31, K32, K33, KC_NO, KC_NO, K34, K35, K36, KC_NO }, \ 27 | { KC_NO, K44, K45, K40, K41, K42, K43, K46, K47, KC_NO } \ 28 | } 29 | -------------------------------------------------------------------------------- /qmk/btrfly/config.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2012 Jun Wako 3 | Copyright 2015 Jack Humbert 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | #pragma once 20 | 21 | #include "config_common.h" 22 | 23 | /* USB Device descriptor parameter */ 24 | #define VENDOR_ID 0x444D 25 | #define MANUFACTURER tshort 26 | #define PRODUCT_ID 0x3436 27 | #define DEVICE_VER 0x0001 28 | 29 | /* mouse config */ 30 | #define MOUSEKEY_INTERVAL 20 31 | #define MOUSEKEY_DELAY 0 32 | #define MOUSEKEY_TIME_TO_MAX 60 33 | #define MOUSEKEY_MAX_SPEED 7 34 | #define MOUSEKEY_WHEEL_DELAY 0 35 | 36 | /* Set 0 if debouncing isn't needed */ 37 | #define DEBOUNCE 5 38 | 39 | /* serial.c configuration for split keyboard */ 40 | #define SOFT_SERIAL_PIN D0 41 | 42 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ 43 | #define LOCKING_SUPPORT_ENABLE 44 | /* Locking resynchronize hack */ 45 | #define LOCKING_RESYNC_ENABLE 46 | 47 | /* Enables This makes it easier for fast typists to use dual-function keys */ 48 | #define PERMISSIVE_HOLD 49 | 50 | /* key matrix size */ 51 | #define MATRIX_ROWS 5 52 | #define MATRIX_COLS 10 53 | 54 | // row-driven 55 | #define MATRIX_ROW_PINS { F7, B1, B3, B2, B6 } 56 | #define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4, B5 } 57 | 58 | /* COL2ROW or ROW2COL */ 59 | #define DIODE_DIRECTION COL2ROW 60 | 61 | /* 62 | * Feature disable options 63 | * These options are also useful to firmware size reduction. 64 | */ 65 | 66 | /* disable debug print */ 67 | // #define NO_DEBUG 68 | 69 | /* disable print */ 70 | // #define NO_PRINT 71 | 72 | /* disable action features */ 73 | //#define NO_ACTION_LAYER 74 | //#define NO_ACTION_TAPPING 75 | //#define NO_ACTION_ONESHOT 76 | //#define NO_ACTION_MACRO 77 | //#define NO_ACTION_FUNCTION 78 | -------------------------------------------------------------------------------- /qmk/btrfly/info.json: -------------------------------------------------------------------------------- 1 | { 2 | "keyboard_name": "btrfly", 3 | "url": "", 4 | "maintainer": "solidhal", 5 | "width": 17, 6 | "height": 7, 7 | "layouts": { 8 | "LAYOUT": { 9 | "layout": [ 10 | {"label":"L00", "x":0, "y":0}, 11 | {"label":"L01", "x":1, "y":0}, 12 | {"label":"L02", "x":2, "y":0}, 13 | {"label":"L03", "x":3, "y":0}, 14 | {"label":"L04", "x":4, "y":0}, 15 | {"label":"L05", "x":5, "y":0}, 16 | {"label":"R00", "x":11, "y":0}, 17 | {"label":"R01", "x":12, "y":0}, 18 | {"label":"R02", "x":13, "y":0}, 19 | {"label":"R03", "x":14, "y":0}, 20 | {"label":"R04", "x":15, "y":0}, 21 | {"label":"R05", "x":16, "y":0}, 22 | {"label":"L10", "x":0, "y":1}, 23 | {"label":"L11", "x":1, "y":1}, 24 | {"label":"L12", "x":2, "y":1}, 25 | {"label":"L13", "x":3, "y":1}, 26 | {"label":"L14", "x":4, "y":1}, 27 | {"label":"L15", "x":5, "y":1}, 28 | {"label":"R10", "x":11, "y":1}, 29 | {"label":"R11", "x":12, "y":1}, 30 | {"label":"R12", "x":13, "y":1}, 31 | {"label":"R13", "x":14, "y":1}, 32 | {"label":"R14", "x":15, "y":1}, 33 | {"label":"R15", "x":16, "y":1}, 34 | {"label":"L20", "x":0, "y":2}, 35 | {"label":"L21", "x":1, "y":2}, 36 | {"label":"L22", "x":2, "y":2}, 37 | {"label":"L23", "x":3, "y":2}, 38 | {"label":"L24", "x":4, "y":2}, 39 | {"label":"L25", "x":5, "y":2}, 40 | {"label":"R20", "x":11, "y":2}, 41 | {"label":"R21", "x":12, "y":2}, 42 | {"label":"R22", "x":13, "y":2}, 43 | {"label":"R23", "x":14, "y":2}, 44 | {"label":"R24", "x":15, "y":2}, 45 | {"label":"R25", "x":16, "y":2}, 46 | {"label":"L32", "x":2, "y":3}, 47 | {"label":"L33", "x":3, "y":3}, 48 | {"label":"R32", "x":13, "y":3}, 49 | {"label":"R33", "x":14, "y":3}, 50 | {"label":"L34", "x":4, "y":4}, 51 | {"label":"L35", "x":5, "y":4}, 52 | {"label":"R30", "x":11, "y":4}, 53 | {"label":"R31", "x":12, "y":4}, 54 | {"label":"L44", "x":6, "y":5}, 55 | {"label":"L45", "x":7, "y":5}, 56 | {"label":"R40", "x":9, "y":5}, 57 | {"label":"R41", "x":10, "y":5}, 58 | {"label":"L42", "x":6, "y":6}, 59 | {"label":"L43", "x":7, "y":6}, 60 | {"label":"R42", "x":9, "y":6}, 61 | {"label":"R43", "x":10, "y":6} 62 | ] 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /qmk/btrfly/keymaps/default/config.h: -------------------------------------------------------------------------------- 1 | /* 2 | This is the c configuration file for the keymap 3 | 4 | Copyright 2012 Jun Wako 5 | Copyright 2015 Jack Humbert 6 | 7 | This program is free software: you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation, either version 2 of the License, or 10 | (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program. If not, see . 19 | */ 20 | 21 | #pragma once 22 | 23 | /* Use I2C or Serial, not both */ 24 | /* #define USE_SERIAL */ 25 | // #define USE_I2C 26 | 27 | /* Select hand configuration */ 28 | 29 | // #define MASTER_LEFT 30 | // #define MASTER_RIGHT 31 | /* #define EE_HANDS */ 32 | -------------------------------------------------------------------------------- /qmk/btrfly/keymaps/default/keymap.c: -------------------------------------------------------------------------------- 1 | #include QMK_KEYBOARD_H 2 | 3 | // Fillers to make layering more clear 4 | 5 | #define ____ KC_TRNS 6 | 7 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 8 | 9 | /* Base (qwerty) 10 | * +-----------------------------------------+ +-----------------------------------------+ 11 | * | | q | w | e | r | t | | y | u | i | o | p | | 12 | * |------+------+------+------+------+------| |------+------+------+------+------+------| 13 | * | | a | s | d | f | g | | h | j | k | l | ; | | 14 | * |------+------+------+------+------+------| |------+------+------+------+------+------| 15 | * | | z | x | c | v | b | | n | m | , | . | / | | 16 | * +------+------+------+------+-------------+ +-------------+------+------+------+------+ 17 | * | | | | | | 18 | * +-------------+------+ +------+-------------+ 19 | * | | | | 20 | * +------+ +------+ 21 | * +-------------+ +-------------+ 22 | * | | | | | | 23 | * |------+------| |------+------| 24 | * | | | | | | 25 | * +-------------+ +-------------+ 26 | */ 27 | [0] = LAYOUT( \ 28 | KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ 29 | KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ 30 | KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, \ 31 | KC_VOLD, KC_VOLU, KC_LALT, KC_DEL, \ 32 | KC_LGUI, KC_ENT,\ 33 | MO(1), KC_SPC, KC_LSFT, MO(2),\ 34 | KC_LCTL, KC_ESC, KC_BSPC,KC_TAB \ 35 | ), 36 | 37 | [1] = LAYOUT( \ 38 | KC_NO, KC_GRV, KC_MINS, KC_EQL, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_NO, \ 39 | KC_NO, KC_LBRC, KC_RBRC, KC_BSLS, KC_NO, KC_0, KC_4, KC_5, KC_6, KC_NO, \ 40 | KC_NO, KC_SCLN, KC_QUOT, KC_SLSH, KC_NO, KC_DOT, KC_1, KC_2, KC_3, KC_NO, \ 41 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ 42 | KC_TRNS, KC_TRNS, \ 43 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ 44 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ 45 | ), 46 | 47 | [2] = LAYOUT( \ 48 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ 49 | QK_BOOT, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11, \ 50 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_NO, KC_NO, KC_END, DF(3), \ 51 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ 52 | KC_TRNS, KC_TRNS, 53 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 54 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ 55 | ), 56 | 57 | 58 | [3] = LAYOUT( \ 59 | KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ 60 | KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ 61 | KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, \ 62 | KC_1, KC_2, KC_3, KC_4, \ 63 | KC_LSFT, KC_RALT, \ 64 | KC_LCTL,KC_SPC, KC_LSFT, MO(4), \ 65 | KC_TAB, KC_ESC, KC_BSPC, KC_TAB \ 66 | ), 67 | 68 | [4] = LAYOUT( \ 69 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ 70 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F11, \ 71 | KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_NO, KC_NO, KC_END, DF(0), \ 72 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ 73 | KC_TRNS, KC_TRNS, 74 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 75 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ 76 | ), 77 | 78 | }; 79 | 80 | 81 | void persistent_default_layer_set(uint16_t default_layer) { 82 | eeconfig_update_default_layer(default_layer); 83 | default_layer_set(default_layer); 84 | } 85 | -------------------------------------------------------------------------------- /qmk/btrfly/readme.md: -------------------------------------------------------------------------------- 1 | # Microdactyl 2 | 3 | to flash this keymap, grab a copy of qmk, copy this "microdactyl" directory into qmk/keyboards/handwired and from the qmk root run: 4 | ``` 5 | make handwired/microdactyl/4x6:default:flash 6 | ``` 7 | 8 | you can also get a .json file to upload to the qmk configurator by running: 9 | ``` 10 | ./bin/qmk c2json -km DEFAULT -kb handwired/microdactyl/4x6 'keyboards/handwired/microdactyl/4x6/keymaps/default/keymap.c' > microdactyl.json 11 | ``` 12 | 13 | to get the configurator to recognize the file you might have to change the keyboard name to `handwired/dactyl-manuform/4x6` 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Dactyl Manuform (4x5, 5x6, 5x7, 6x6) 23 | ====== 24 | the [Dactyl-Manuform](https://github.com/tshort/dactyl-keyboard) is a split curved keyboard based on the design of [adereth dactyl](https://github.com/adereth/dactyl-keyboard) and thumb cluster design of the [manuform](https://geekhack.org/index.php?topic=46015.0) keyboard, the hardware is similar to the let's split keyboard. all information needed for making one is in the first link. 25 | ![Imgur](https://i.imgur.com/7y0Vbyd.jpg) 26 | 27 | 28 | ## First Time Setup 29 | 30 | Download or clone the `qmk_firmware` repo and navigate to its top level directory. Once your build environment is setup, you'll be able to generate the default .hex using: 31 | 32 | Depending on your Layout chose one of the follwing commands: 33 | 34 | ``` 35 | $ make handwired/dactyl_manuform/YOUR_LAYOUT:YOUR_KEYMAP_NAME 36 | ``` 37 | 38 | example: 39 | ``` 40 | $ make handwired/dactyl_manuform/4x5:default 41 | ``` 42 | 43 | If everything worked correctly you will see a file: 44 | 45 | ``` 46 | dactyl_manuform_YOUR_LAYOUT_YOUR_KEYMAP_NAME.hex 47 | ``` 48 | 49 | For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/docs/faq_keymap.md) in the main readme.md. 50 | 51 | 52 | ## Keymaps 53 | 54 | ### [Keymaps 4x5](/keyboards/handwired/dactyl_manuform/4x5/keymaps/) 55 | 56 | #### Default 57 | Simple QWERTY layout with 3 Layers. 58 | #### Dvorak 59 | 60 | ### [Keymaps 5x6](/keyboards/handwired/dactyl_manuform/5x6/keymaps/) 61 | 62 | #### Default 63 | Just a copy of the Impstyle keymap. Feel free to adjust it. 64 | 65 | #### Impstyle 66 | A simple QWERTY keymap with 3 Layers. Both sides are connected via serial and the Left ist the master. 67 | 68 | ### [Keymaps 5x7 aka almost Ergodox](/keyboards/handwired/dactyl_manuform/5x7/keymaps/) 69 | #### Default 70 | Keymap of Loligagger from geekhack. 71 | 72 | ### [Keymaps 6x6](/keyboards/handwired/dactyl_manuform/6x6/keymaps/) 73 | 74 | #### Default 75 | Simple QWERTY layout with 3 Layers. 76 | 77 | ## Required Hardware 78 | 79 | Apart from diodes and key switches for the keyboard matrix in each half, you 80 | will need: 81 | 82 | * 2 Arduino Pro Micros. You can find these on AliExpress for ≈3.50USD each. 83 | * 2 TRRS sockets and 1 TRRS cable, or 2 TRS sockets and 1 TRS cable 84 | 85 | Alternatively, you can use any sort of cable and socket that has at least 3 86 | wires. If you want to use I2C to communicate between halves, you will need a 87 | cable with at least 4 wires and 2x 4.7kΩ pull-up resistors 88 | 89 | ## Optional Hardware 90 | A speaker can be hooked-up to either side to the `5` (`C6`) pin and `GND`, and turned on via `AUDIO_ENABLE`. 91 | 92 | ## Wiring 93 | 94 | The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and digital pin 3 (i.e. 95 | PD0 on the ATmega32u4) between the two Pro Micros. 96 | 97 | Next, wire your key matrix to any of the remaining 17 IO pins of the pro micro 98 | and modify the `matrix.c` accordingly. 99 | 100 | The wiring for serial: 101 | 102 | ![serial wiring](https://i.imgur.com/C3D1GAQ.png) 103 | 104 | The wiring for i2c: 105 | 106 | ![i2c wiring](https://i.imgur.com/Hbzhc6E.png) 107 | 108 | The pull-up resistors may be placed on either half. It is also possible 109 | to use 4 resistors and have the pull-ups in both halves, but this is 110 | unnecessary in simple use cases. 111 | 112 | You can change your configuration between serial and i2c by modifying your `config.h` file. 113 | 114 | ## Notes on Software Configuration 115 | 116 | the keymaps in here are for the 4x5 layout of the keyboard only. 117 | 118 | ## Flashing 119 | 120 | To flash your firmware take a look at: [Flashing Instructions and Bootloader Information](https://docs.qmk.fm/#/flashing) 121 | 122 | 123 | ## Choosing which board to plug the USB cable into (choosing Master) 124 | 125 | Because the two boards are identical, the firmware has logic to differentiate the left and right board. 126 | 127 | It uses two strategies to figure things out: looking at the EEPROM (memory on the chip) or looking if the current board has the usb cable. 128 | 129 | The EEPROM approach requires additional setup (flashing the eeprom) but allows you to swap the usb cable to either side. 130 | 131 | The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra. 132 | 133 | ### Setting the left hand as master 134 | 135 | If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set. 136 | 137 | ### Setting the right hand as master 138 | 139 | If you always plug the usb cable into the right board, add an extra flag to your `config.h` 140 | ``` 141 | #define MASTER_RIGHT 142 | ``` 143 | 144 | ### Setting EE_hands to use either hands as master 145 | 146 | If you define `EE_HANDS` in your `config.h`, you will need to set the 147 | EEPROM for the left and right halves. 148 | 149 | The EEPROM is used to store whether the 150 | half is left handed or right handed. This makes it so that the same firmware 151 | file will run on both hands instead of having to flash left and right handed 152 | versions of the firmware to each half. To flash the EEPROM file for the left 153 | half run: 154 | ``` 155 | make handwired/dactyl_promicro:default:dfu-split-left 156 | make handwired/dactyl_promicro:default:dfu-split-right 157 | ``` 158 | 159 | After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash. 160 | 161 | Note that you need to program both halves, but you have the option of using 162 | different keymaps for each half. You could program the left half with a QWERTY 163 | layout and the right half with a Colemak layout using bootmagic's default layout option. 164 | Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the 165 | right half is connected. 166 | 167 | 168 | Notes on Using Pro Micro 3.3V 169 | ----------------------------- 170 | 171 | Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects 172 | the frequency on the 3.3V board. 173 | 174 | Also, if the slave board is producing weird characters in certain columns, 175 | update the following line in `matrix.c` to the following: 176 | 177 | ``` 178 | // wait_us(30); // without this wait read unstable value. 179 | wait_us(300); // without this wait read unstable value. 180 | ``` 181 | -------------------------------------------------------------------------------- /qmk/btrfly/rules.mk: -------------------------------------------------------------------------------- 1 | # MCU name 2 | MCU = atmega32u4 3 | 4 | # Bootloader selection 5 | # Teensy halfkay 6 | # Pro Micro caterina 7 | # Atmel DFU atmel-dfu 8 | # LUFA DFU lufa-dfu 9 | # QMK DFU qmk-dfu 10 | # ATmega32A bootloadHID 11 | # ATmega328P USBasp 12 | BOOTLOADER = caterina 13 | 14 | # Build Options 15 | # change to "no" to disable the options, or define them in the Makefile in 16 | # the appropriate keymap folder that will get included automatically 17 | # 18 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) 19 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) 20 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) 21 | CONSOLE_ENABLE = no # Console for debug(+400) 22 | COMMAND_ENABLE = yes # Commands for debug and configuration 23 | NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 24 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality 25 | MIDI_ENABLE = no # MIDI controls 26 | AUDIO_ENABLE = no # Audio output on port C6 27 | UNICODE_ENABLE = no # Unicode 28 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID 29 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. 30 | 31 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE 32 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend 33 | -------------------------------------------------------------------------------- /right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SolidHal/btrfly-keyboard/ffd352c1231df5dd64ccd41f1b3cddc41a128a04/right.png -------------------------------------------------------------------------------- /src/dactyl_keyboard/dactyl.clj: -------------------------------------------------------------------------------- 1 | (ns dactyl-keyboard.dactyl 2 | (:refer-clojure :exclude [use import]) 3 | (:require [clojure.core.matrix :refer [array matrix mmul]] 4 | [scad-clj.scad :refer :all] 5 | [scad-clj.model :refer :all] 6 | [unicode-math.core :refer :all])) 7 | 8 | (defn deg2rad [degrees] 9 | (* (/ degrees 180) pi)) 10 | 11 | ;;;;;;;;;;;;;;;;;;;;;; 12 | ;; Shape parameters ;; 13 | ;;;;;;;;;;;;;;;;;;;;;; 14 | 15 | (def nrows 4) 16 | (def ncols 5) 17 | 18 | (def α (/ π 360)) ; curvature along the columns 19 | (def β (/ π 360)) ; curvature along the rows 20 | (def centerrow (- nrows 3)) ; controls front-back tilt 21 | (def centercol 4) ; controls left-right tilt / tenting (higher number is more tenting) 22 | (def tenting-angle (/ π 7)) ; or, change this for more precise tenting control 23 | (def column-style 24 | (if (> nrows 5) :orthographic :standard)) ; options include :standard, :orthographic, and :fixed 25 | ; (def column-style :fixed) 26 | (def pinky-15u false) 27 | 28 | (defn column-offset [column] (cond 29 | (= column 2) [0 0 0] ; middle finger 30 | (= column 3) [0 0 0] ; ring finger 31 | ;(>= column 4) [0 0 0] ; keep pinky in line with first rows 32 | (>= column 4) [0 0 0] ; original [0 -5.8 5.64] 33 | :else [0 0 0])) 34 | 35 | (def thumb-offsets [6 -3 7]) ; location of thumb cluster relative to main keyboard body 36 | 37 | (def keyboard-z-offset 8.01) ; controls overall height; original=9 with centercol=3; use 16 for centercol=2 38 | 39 | (def extra-width 1.5) ; extra space between the base of keys; original= 2 40 | (def extra-height 1.5) ; original= 0.5 41 | 42 | (def wall-z-offset -3) ; original=-15 length of the first downward-sloping part of the wall (negative) 43 | (def wall-xy-offset 1) ; offset in the x and/or y direction for the first downward-sloping part of the wall (negative) 44 | (def wall-thickness 3) ; wall thickness parameter; originally 5 45 | 46 | ;; Settings for column-style == :fixed 47 | ;; The defaults roughly match Maltron settings 48 | ;; http://patentimages.storage.googleapis.com/EP0219944A2/imgf0002.png 49 | ;; Fixed-z overrides the z portion of the column ofsets above. 50 | ;; NOTE: THIS DOESN'T WORK QUITE LIKE I'D HOPED. 51 | (def fixed-angles [(deg2rad 10) (deg2rad 10) 0 0 0 (deg2rad -15) (deg2rad -15)]) 52 | (def fixed-x [-41.5 -22.5 0 20.3 41.4 65.5 89.6]) ; relative to the middle finger 53 | (def fixed-z [12.1 8.3 0 5 10.7 14.5 17.5]) 54 | (def fixed-tenting (deg2rad 0)) 55 | 56 | ; If you use Cherry MX or Gateron switches, this can be turned on. 57 | ; If you use other switches such as Kailh, you should set this as false 58 | (def create-side-nubs? true) 59 | 60 | ;;;;;;;;;;;;;;;;;;;;;;; 61 | ;; General variables ;; 62 | ;;;;;;;;;;;;;;;;;;;;;;; 63 | 64 | (def lastrow (dec nrows)) 65 | (def cornerrow (dec lastrow)) 66 | (def lastcol (dec ncols)) 67 | 68 | ;;;;;;;;;;;;;;;;; 69 | ;; Switch Hole ;; 70 | ;;;;;;;;;;;;;;;;; 71 | 72 | (def keyswitch-height 14.2) ;; Was 14.1, then 14.25 73 | (def keyswitch-width 14.2) 74 | 75 | (def sa-profile-key-height 12.7) 76 | 77 | (def plate-thickness 2) 78 | (def side-nub-thickness 4) 79 | (def retention-tab-thickness 1.5) 80 | (def retention-tab-hole-thickness (- plate-thickness retention-tab-thickness)) 81 | (def mount-width (+ keyswitch-width 3)) 82 | (def mount-height (+ keyswitch-height 3)) 83 | 84 | (def single-plate 85 | (let [top-wall (->> (cube (+ keyswitch-width 3) 1.5 plate-thickness) 86 | (translate [0 87 | (+ (/ 1.5 2) (/ keyswitch-height 2)) 88 | (/ plate-thickness 2)])) 89 | left-wall (->> (cube 1.5 (+ keyswitch-height 3) plate-thickness) 90 | (translate [(+ (/ 1.5 2) (/ keyswitch-width 2)) 91 | 0 92 | (/ plate-thickness 2)])) 93 | side-nub (->> (binding [*fn* 30] (cylinder 1 2.75)) 94 | (rotate (/ π 2) [1 0 0]) 95 | (translate [(+ (/ keyswitch-width 2)) 0 1]) 96 | (hull (->> (cube 1.5 2.75 side-nub-thickness) 97 | (translate [(+ (/ 1.5 2) (/ keyswitch-width 2)) 98 | 0 99 | (/ side-nub-thickness 2)]))) 100 | (translate [0 0 (- plate-thickness side-nub-thickness)])) 101 | plate-half (union top-wall left-wall (if create-side-nubs? (with-fn 100 side-nub))) 102 | top-nub (->> (cube 5 5 retention-tab-hole-thickness) 103 | (translate [(+ (/ keyswitch-width 2)) 0 (/ retention-tab-hole-thickness 2)])) 104 | top-nub-pair (union top-nub 105 | (->> top-nub 106 | (mirror [1 0 0]) 107 | (mirror [0 1 0])))] 108 | (difference 109 | (union plate-half 110 | (->> plate-half 111 | (mirror [1 0 0]) 112 | (mirror [0 1 0]))) 113 | (->> 114 | top-nub-pair 115 | (rotate (/ π 2) [0 0 1]))))) 116 | 117 | ;;;;;;;;;;;;;;;; 118 | ;; SA Keycaps ;; 119 | ;;;;;;;;;;;;;;;; 120 | 121 | (def sa-length 18.25) 122 | (def sa-double-length 37.5) 123 | (def sa-cap {1 (let [bl2 (/ 18.5 2) 124 | m (/ 17 2) 125 | key-cap (hull (->> (polygon [[bl2 bl2] [bl2 (- bl2)] [(- bl2) (- bl2)] [(- bl2) bl2]]) 126 | (extrude-linear {:height 0.1 :twist 0 :convexity 0}) 127 | (translate [0 0 0.05])) 128 | (->> (polygon [[m m] [m (- m)] [(- m) (- m)] [(- m) m]]) 129 | (extrude-linear {:height 0.1 :twist 0 :convexity 0}) 130 | (translate [0 0 6])) 131 | (->> (polygon [[6 6] [6 -6] [-6 -6] [-6 6]]) 132 | (extrude-linear {:height 0.1 :twist 0 :convexity 0}) 133 | (translate [0 0 12])))] 134 | (->> key-cap 135 | (translate [0 0 (- 30 plate-thickness)]) 136 | (color [220/255 163/255 163/255 1]))) 137 | 2 (let [bl2 sa-length 138 | bw2 (/ 18.25 2) 139 | key-cap (hull (->> (polygon [[bw2 bl2] [bw2 (- bl2)] [(- bw2) (- bl2)] [(- bw2) bl2]]) 140 | (extrude-linear {:height 0.1 :twist 0 :convexity 0}) 141 | (translate [0 0 0.05])) 142 | (->> (polygon [[6 16] [6 -16] [-6 -16] [-6 16]]) 143 | (extrude-linear {:height 0.1 :twist 0 :convexity 0}) 144 | (translate [0 0 12])))] 145 | (->> key-cap 146 | (translate [0 0 (+ 5 plate-thickness)]) 147 | (color [127/255 159/255 127/255 1]))) 148 | 1.5 (let [bl2 (/ 18.25 2) 149 | bw2 (/ 27.94 2) 150 | key-cap (hull (->> (polygon [[bw2 bl2] [bw2 (- bl2)] [(- bw2) (- bl2)] [(- bw2) bl2]]) 151 | (extrude-linear {:height 0.1 :twist 0 :convexity 0}) 152 | (translate [0 0 0.05])) 153 | (->> (polygon [[11 6] [-11 6] [-11 -6] [11 -6]]) 154 | (extrude-linear {:height 0.1 :twist 0 :convexity 0}) 155 | (translate [0 0 12])))] 156 | (->> key-cap 157 | (translate [0 0 (+ 5 plate-thickness)]) 158 | (color [240/255 223/255 175/255 1])))}) 159 | 160 | 161 | (def flat-cap {1 (let [bl2 (/ 18.5 2) 162 | m (/ 17 2) 163 | key-cap (hull (->> (polygon [[bl2 bl2] [bl2 (- bl2)] [(- bl2) (- bl2)] [(- bl2) bl2]]) 164 | (extrude-linear {:height 0.1 :twist 0 :convexity 0}) 165 | (translate [0 0 -6])) 166 | (->> (polygon [[m m] [m (- m)] [(- m) (- m)] [(- m) m]]) 167 | (extrude-linear {:height 0.1 :twist 0 :convexity 0}) 168 | (translate [0 0 -6])) 169 | (->> (polygon [[6 6] [6 -6] [-6 -6] [-6 6]]) 170 | (extrude-linear {:height 0.1 :twist 0 :convexity 0}) 171 | (translate [0 0 -6])))] 172 | (->> key-cap 173 | (translate [0 0 (+ 5 plate-thickness)]) 174 | (color [220/255 163/255 163/255 1]))) 175 | 2 (let [bl2 sa-length 176 | bw2 (/ 18.25 2) 177 | key-cap (hull (->> (polygon [[bw2 bl2] [bw2 (- bl2)] [(- bw2) (- bl2)] [(- bw2) bl2]]) 178 | (extrude-linear {:height 0.1 :twist 0 :convexity 0}) 179 | (translate [0 0 0.05])) 180 | (->> (polygon [[6 16] [6 -16] [-6 -16] [-6 16]]) 181 | (extrude-linear {:height 0.1 :twist 0 :convexity 0}) 182 | (translate [0 0 12])))] 183 | (->> key-cap 184 | (translate [0 0 (+ 5 plate-thickness)]) 185 | (color [127/255 159/255 127/255 1]))) 186 | 1.5 (let [bl2 (/ 18.25 2) 187 | bw2 (/ 27.94 2) 188 | key-cap (hull (->> (polygon [[bw2 bl2] [bw2 (- bl2)] [(- bw2) (- bl2)] [(- bw2) bl2]]) 189 | (extrude-linear {:height 0.1 :twist 0 :convexity 0}) 190 | (translate [0 0 0.05])) 191 | (->> (polygon [[11 6] [-11 6] [-11 -6] [11 -6]]) 192 | (extrude-linear {:height 0.1 :twist 0 :convexity 0}) 193 | (translate [0 0 12])))] 194 | (->> key-cap 195 | (translate [0 0 (+ 5 plate-thickness)]) 196 | (color [240/255 223/255 175/255 1])))}) 197 | 198 | ;;;;;;;;;;;;;;;;;;;;;;;;; 199 | ;; Placement Functions ;; 200 | ;;;;;;;;;;;;;;;;;;;;;;;;; 201 | 202 | (def columns (range 0 ncols)) 203 | (def rows (range 0 nrows)) 204 | 205 | (def cap-top-height (+ plate-thickness sa-profile-key-height)) 206 | (def row-radius (+ (/ (/ (+ mount-height extra-height) 2) 207 | (Math/sin (/ α 2))) 208 | cap-top-height)) 209 | (def column-radius (+ (/ (/ (+ mount-width extra-width) 2) 210 | (Math/sin (/ β 2))) 211 | cap-top-height)) 212 | (def column-x-delta (+ -1 (- (* column-radius (Math/sin β))))) 213 | 214 | (defn offset-for-column [col] 215 | (if (and (true? pinky-15u) (= col lastcol)) 5.5 0)) 216 | (defn apply-key-geometry [translate-fn rotate-x-fn rotate-y-fn column row shape] 217 | (let [column-angle (* β (- centercol column)) 218 | placed-shape (->> shape 219 | (translate-fn [(offset-for-column column) 0 (- row-radius)]) 220 | (rotate-x-fn (* α (- centerrow row))) 221 | (translate-fn [0 0 row-radius]) 222 | (translate-fn [0 0 (- column-radius)]) 223 | (rotate-y-fn column-angle) 224 | (translate-fn [0 0 column-radius]) 225 | (translate-fn (column-offset column))) 226 | column-z-delta (* column-radius (- 1 (Math/cos column-angle))) 227 | placed-shape-ortho (->> shape 228 | (translate-fn [0 0 (- row-radius)]) 229 | (rotate-x-fn (* α (- centerrow row))) 230 | (translate-fn [0 0 row-radius]) 231 | (rotate-y-fn column-angle) 232 | (translate-fn [(- (* (- column centercol) column-x-delta)) 0 column-z-delta]) 233 | (translate-fn (column-offset column))) 234 | placed-shape-fixed (->> shape 235 | (rotate-y-fn (nth fixed-angles column)) 236 | (translate-fn [(nth fixed-x column) 0 (nth fixed-z column)]) 237 | (translate-fn [0 0 (- (+ row-radius (nth fixed-z column)))]) 238 | (rotate-x-fn (* α (- centerrow row))) 239 | (translate-fn [0 0 (+ row-radius (nth fixed-z column))]) 240 | (rotate-y-fn fixed-tenting) 241 | (translate-fn [0 (second (column-offset column)) 0]))] 242 | (->> (case column-style 243 | :orthographic placed-shape-ortho 244 | :fixed placed-shape-fixed 245 | placed-shape) 246 | (rotate-y-fn tenting-angle) 247 | (translate-fn [0 0 keyboard-z-offset])))) 248 | 249 | (defn key-place [column row shape] 250 | (apply-key-geometry translate 251 | (fn [angle obj] (rotate angle [1 0 0] obj)) 252 | (fn [angle obj] (rotate angle [0 1 0] obj)) 253 | column row shape)) 254 | 255 | (defn rotate-around-x [angle position] 256 | (mmul 257 | [[1 0 0] 258 | [0 (Math/cos angle) (- (Math/sin angle))] 259 | [0 (Math/sin angle) (Math/cos angle)]] 260 | position)) 261 | 262 | (defn rotate-around-y [angle position] 263 | (mmul 264 | [[(Math/cos angle) 0 (Math/sin angle)] 265 | [0 1 0] 266 | [(- (Math/sin angle)) 0 (Math/cos angle)]] 267 | position)) 268 | 269 | (defn key-position [column row position] 270 | (apply-key-geometry (partial map +) rotate-around-x rotate-around-y column row position)) 271 | 272 | (def key-holes 273 | (apply union 274 | (for [column columns 275 | row rows 276 | :when (or (.contains [2 3] column) 277 | (not= row lastrow))] 278 | (->> single-plate 279 | (key-place column row))))) 280 | 281 | (def caps 282 | (apply union 283 | (for [column columns 284 | row rows 285 | :when (or (.contains [2 3] column) 286 | (not= row lastrow))] 287 | (->> (sa-cap (if (and (true? pinky-15u) (= column lastcol)) 1.5 1)) 288 | (key-place column row))))) 289 | 290 | ;;;;;;;;;;;;;;;;;;;; 291 | ;; Web Connectors ;; 292 | ;;;;;;;;;;;;;;;;;;;; 293 | 294 | (def web-thickness 2) 295 | (def post-size 0.1) 296 | (def web-post (->> (cube post-size post-size web-thickness) 297 | (translate [0 0 (+ (/ web-thickness -2) 298 | plate-thickness)]))) 299 | 300 | (def post-adj (/ post-size 2)) 301 | (def web-post-tr (translate [(- (/ mount-width 2) post-adj) (- (/ mount-height 2) post-adj) 0] web-post)) 302 | (def web-post-tl (translate [(+ (/ mount-width -2) post-adj) (- (/ mount-height 2) post-adj) 0] web-post)) 303 | (def web-post-bl (translate [(+ (/ mount-width -2) post-adj) (+ (/ mount-height -2) post-adj) 0] web-post)) 304 | (def web-post-br (translate [(- (/ mount-width 2) post-adj) (+ (/ mount-height -2) post-adj) 0] web-post)) 305 | (def web-post-tl-squish (translate[0.56 20.52 10.32] web-post-tl)) 306 | 307 | ; wide posts for 1.5u keys in the main cluster 308 | 309 | (if (true? pinky-15u) 310 | (do (def wide-post-tr (translate [(- (/ mount-width 1.2) post-adj) (- (/ mount-height 2) post-adj) 0] web-post)) 311 | (def wide-post-tl (translate [(+ (/ mount-width -1.2) post-adj) (- (/ mount-height 2) post-adj) 0] web-post)) 312 | (def wide-post-bl (translate [(+ (/ mount-width -1.2) post-adj) (+ (/ mount-height -2) post-adj) 0] web-post)) 313 | (def wide-post-br (translate [(- (/ mount-width 1.2) post-adj) (+ (/ mount-height -2) post-adj) 0] web-post))) 314 | (do (def wide-post-tr web-post-tr) 315 | (def wide-post-tl web-post-tl) 316 | (def wide-post-bl web-post-bl) 317 | (def wide-post-br web-post-br))) 318 | 319 | (defn triangle-hulls [& shapes] 320 | (apply union 321 | (map (partial apply hull) 322 | (partition 3 1 shapes)))) 323 | 324 | (def connectors 325 | (apply union 326 | (concat 327 | ;; Row connections 328 | (for [column (range 0 (dec ncols)) 329 | row (range 0 lastrow)] 330 | (triangle-hulls 331 | (key-place (inc column) row web-post-tl) 332 | (key-place column row web-post-tr) 333 | (key-place (inc column) row web-post-bl) 334 | (key-place column row web-post-br))) 335 | 336 | ;; Column connections 337 | (for [column columns 338 | row (range 0 cornerrow)] 339 | (triangle-hulls 340 | (key-place column row web-post-bl) 341 | (key-place column row web-post-br) 342 | (key-place column (inc row) web-post-tl) 343 | (key-place column (inc row) web-post-tr))) 344 | 345 | ;; Diagonal connections 346 | (for [column (range 0 (dec ncols)) 347 | row (range 0 cornerrow)] 348 | (triangle-hulls 349 | (key-place column row web-post-br) 350 | (key-place column (inc row) web-post-tr) 351 | (key-place (inc column) row web-post-bl) 352 | (key-place (inc column) (inc row) web-post-tl)))))) 353 | 354 | ;;;;;;;;;;;; 355 | ;; Thumbs ;; 356 | ;;;;;;;;;;;; 357 | 358 | (def thumborigin 359 | (map + (key-position 1 cornerrow [(/ mount-width 2) (- (/ mount-height 2)) 0]) 360 | thumb-offsets)) 361 | 362 | (defn thumb-tr-place [shape] 363 | (->> shape 364 | (rotate (deg2rad 14) [1 0 0]) 365 | (rotate (deg2rad -15) [0 1 0]) 366 | (rotate (deg2rad 10) [0 0 1]) ; original 10 367 | (translate thumborigin) 368 | (translate [-15 -10 5]))) ; original 1.5u (translate [-12 -16 3]) 369 | (defn thumb-tl-place [shape] 370 | (->> shape 371 | (rotate (deg2rad 10) [1 0 0]) 372 | (rotate (deg2rad -23) [0 1 0]) 373 | (rotate (deg2rad 25) [0 0 1]) ; original 10 374 | (translate thumborigin) 375 | (translate [-34 -15.15 -1.4]))) ; original (translate [-35 -16 -2]))) 376 | 377 | 378 | (defn thumb-mr-place [shape] 379 | (->> shape 380 | (rotate (deg2rad 10) [1 0 0]) 381 | (rotate (deg2rad -23) [0 1 0]) 382 | (rotate (deg2rad 25) [0 0 1]) 383 | (translate thumborigin) 384 | (translate [-21 -33 -4.3]))) ; (translate [-23 -34 -6]) 385 | (defn thumb-br-place [shape] 386 | (->> shape 387 | (rotate (deg2rad 6) [1 0 0]) 388 | (rotate (deg2rad -34) [0 1 0]) 389 | (rotate (deg2rad 35) [0 0 1]) 390 | (translate thumborigin) 391 | (translate [-36 -42 -13.7]))) ; (translate [-39 -43 -16]) 392 | (defn thumb-bl-place [shape] 393 | (->> shape 394 | (rotate (deg2rad 6) [1 0 0]) 395 | (rotate (deg2rad -32) [0 1 0]) 396 | (rotate (deg2rad 35) [0 0 1]) 397 | (translate thumborigin) 398 | (translate [-48.5 -24 -10.3]))) ; (translate [-51 -25 -12]))) 399 | 400 | 401 | (defn thumb-1x-layout [shape] 402 | (union 403 | (thumb-mr-place shape) 404 | (thumb-br-place shape) 405 | (thumb-tl-place shape) 406 | (thumb-bl-place shape))) 407 | 408 | (defn thumb-15x-layout [shape] 409 | (union 410 | (thumb-tr-place shape))) 411 | 412 | (def larger-plate 413 | (let [plate-height (- (/ (- sa-double-length mount-height) 3) 0.5) 414 | top-plate (->> (cube mount-width plate-height web-thickness) 415 | (translate [0 (/ (+ plate-height mount-height) 2) 416 | (- plate-thickness (/ web-thickness 2))]))] 417 | (union top-plate (mirror [0 1 0] top-plate)))) 418 | 419 | (def thumbcaps 420 | (union 421 | (thumb-1x-layout (sa-cap 1)) 422 | (thumb-15x-layout (rotate (/ π 2) [0 0 1] (sa-cap 1))))) 423 | 424 | (def thumb 425 | (union 426 | (thumb-1x-layout single-plate) 427 | (thumb-15x-layout single-plate) 428 | ; (thumb-15x-layout larger-plate) 429 | )) 430 | 431 | (def thumb-post-tr (translate [(- (/ mount-width 2) post-adj) (- (/ mount-height 2) post-adj) 0] web-post)) 432 | (def thumb-post-tl (translate [(+ (/ mount-width -2) post-adj) (- (/ mount-height 2) post-adj) 0] web-post)) 433 | (def thumb-post-bl (translate [(+ (/ mount-width -2) post-adj) (+ (/ mount-height -2) post-adj) 0] web-post)) 434 | (def thumb-post-br (translate [(- (/ mount-width 2) post-adj) (+ (/ mount-height -2) post-adj) 0] web-post)) 435 | 436 | (def thumb-connectors 437 | (union 438 | (triangle-hulls ; top two 439 | (thumb-tl-place web-post-tr) 440 | (thumb-tl-place web-post-br) 441 | (thumb-tr-place thumb-post-tl) 442 | (thumb-tr-place thumb-post-bl)) 443 | (triangle-hulls ; bottom two 444 | (thumb-br-place web-post-tr) 445 | (thumb-br-place web-post-br) 446 | (thumb-mr-place web-post-tl) 447 | (thumb-mr-place web-post-bl)) 448 | (triangle-hulls 449 | (thumb-mr-place web-post-tr) 450 | (thumb-mr-place web-post-br) 451 | (thumb-tr-place thumb-post-br)) 452 | (triangle-hulls ; between top row and bottom row 453 | (thumb-br-place web-post-tl) 454 | (thumb-bl-place web-post-bl) 455 | (thumb-br-place web-post-tr) 456 | (thumb-bl-place web-post-br) 457 | (thumb-mr-place web-post-tl) 458 | (thumb-tl-place web-post-bl) 459 | (thumb-mr-place web-post-tr) 460 | (thumb-tl-place web-post-br) 461 | (thumb-tr-place web-post-bl) 462 | (thumb-mr-place web-post-tr) 463 | (thumb-tr-place web-post-br)) 464 | (triangle-hulls ; top two to the middle two, starting on the left 465 | (thumb-tl-place web-post-tl) 466 | (thumb-bl-place web-post-tr) 467 | (thumb-tl-place web-post-bl) 468 | (thumb-bl-place web-post-br) 469 | (thumb-mr-place web-post-tr) 470 | (thumb-tl-place web-post-bl) 471 | (thumb-tl-place web-post-br) 472 | (thumb-mr-place web-post-tr)) 473 | (triangle-hulls ; top two to the main keyboard, starting on the left 474 | (thumb-tl-place web-post-tl-squish) 475 | (thumb-tl-place web-post-tl) 476 | (key-place 0 cornerrow web-post-bl) 477 | (thumb-tl-place web-post-tr) 478 | (key-place 0 cornerrow web-post-br) 479 | (thumb-tr-place thumb-post-tl) 480 | (key-place 1 cornerrow web-post-bl) 481 | (thumb-tr-place thumb-post-tr) 482 | (key-place 1 cornerrow web-post-br) 483 | (key-place 2 lastrow web-post-tl) 484 | (key-place 2 lastrow web-post-bl) 485 | (thumb-tr-place thumb-post-tr) 486 | (key-place 2 lastrow web-post-bl) 487 | (thumb-tr-place thumb-post-br) 488 | (key-place 2 lastrow web-post-br) 489 | (key-place 3 lastrow web-post-bl) 490 | (key-place 2 lastrow web-post-tr) 491 | (key-place 3 lastrow web-post-tl) 492 | (key-place 3 cornerrow web-post-bl) 493 | (key-place 3 lastrow web-post-tr) 494 | (key-place 3 cornerrow web-post-br) 495 | (key-place 4 cornerrow web-post-bl)) 496 | (triangle-hulls 497 | (key-place 1 cornerrow web-post-br) 498 | (key-place 2 lastrow web-post-tl) 499 | (key-place 2 cornerrow web-post-bl) 500 | (key-place 2 lastrow web-post-tr) 501 | (key-place 2 cornerrow web-post-br) 502 | (key-place 3 cornerrow web-post-bl)) 503 | (triangle-hulls 504 | (key-place 3 lastrow web-post-tr) 505 | (key-place 3 lastrow web-post-br) 506 | (key-place 3 lastrow web-post-tr) 507 | (key-place 4 cornerrow web-post-bl)))) 508 | 509 | ;;;;;;;;;; 510 | ;; Case ;; 511 | ;;;;;;;;;; 512 | 513 | (defn bottom [height p] 514 | (->> (project p) 515 | (extrude-linear {:height height :twist 0 :convexity 0}) 516 | (translate [0 0 (- (/ height 2) 10)]))) 517 | 518 | (defn bottom-hull [& p] 519 | (hull p (bottom 0.001 p))) 520 | 521 | (def left-wall-x-offset 5) ; original 10 522 | (def left-wall-z-offset 3) ; original 3 523 | 524 | (defn left-key-position-squish [row direction] 525 | (cond 526 | (= row 0) (map - (key-position 0 row [(* mount-width 0) (* direction mount-height 0.5) 0]) [19.7 0 -3.75]) 527 | (= row 1) (map - (key-position 0 row [(* mount-width 0) (* direction mount-height 0.5) 0]) [23.5 0 -3.75]) 528 | (= row 2) (map - (key-position 0 row [(* mount-width 0) (* direction mount-height 0.5) 0]) [27.53 0 -3.75]) 529 | ; used for the left/front corner 530 | (= row 100) (map - (key-position 0 0 [(* mount-width 0) (* direction mount-height 0.5) 0]) [16.1 0 -3.75]) 531 | :else (map - (key-position 0 row [(* mount-width 0) (* direction mount-height 0.5) 0]) [20 0 -3.7]) 532 | )) 533 | 534 | (defn left-key-place-squish [row direction shape] 535 | (translate (left-key-position-squish row direction) shape)) 536 | 537 | 538 | (defn left-key-position [row direction] 539 | (map - (key-position 0 row [(* mount-width -0.5) (* direction mount-height 0.5) 0]) [left-wall-x-offset 0 left-wall-z-offset])) 540 | 541 | (defn left-key-place [row direction shape] 542 | (translate (left-key-position row direction) shape)) 543 | 544 | (defn wall-locate1 [dx dy] [(* dx wall-thickness) (* dy wall-thickness) -1]) 545 | (defn wall-locate2 [dx dy] [(* dx wall-xy-offset) (* dy wall-xy-offset) wall-z-offset]) 546 | (defn wall-locate3 [dx dy] [(* dx (+ wall-xy-offset wall-thickness)) (* dy (+ wall-xy-offset wall-thickness)) wall-z-offset]) 547 | 548 | (defn wall-brace [place1 dx1 dy1 post1 place2 dx2 dy2 post2] 549 | (union 550 | (hull 551 | (place1 post1) 552 | (place1 (translate (wall-locate1 dx1 dy1) post1)) 553 | (place1 (translate (wall-locate2 dx1 dy1) post1)) 554 | (place1 (translate (wall-locate3 dx1 dy1) post1)) 555 | (place2 post2) 556 | (place2 (translate (wall-locate1 dx2 dy2) post2)) 557 | (place2 (translate (wall-locate2 dx2 dy2) post2)) 558 | (place2 (translate (wall-locate3 dx2 dy2) post2))) 559 | (bottom-hull 560 | (place1 (translate (wall-locate2 dx1 dy1) post1)) 561 | (place1 (translate (wall-locate3 dx1 dy1) post1)) 562 | (place2 (translate (wall-locate2 dx2 dy2) post2)) 563 | (place2 (translate (wall-locate3 dx2 dy2) post2))))) 564 | 565 | (defn key-wall-brace [x1 y1 dx1 dy1 post1 x2 y2 dx2 dy2 post2] 566 | (wall-brace (partial key-place x1 y1) dx1 dy1 post1 567 | (partial key-place x2 y2) dx2 dy2 post2)) 568 | 569 | (def right-wall 570 | (let [tr (if (true? pinky-15u) wide-post-tr web-post-tr) 571 | br (if (true? pinky-15u) wide-post-br web-post-br)] 572 | (union (key-wall-brace lastcol 0 0 1 tr lastcol 0 1 0 tr) 573 | (for [y (range 0 lastrow)] (key-wall-brace lastcol y 1 0 tr lastcol y 1 0 br)) 574 | (for [y (range 1 lastrow)] (key-wall-brace lastcol (dec y) 1 0 br lastcol y 1 0 tr)) 575 | (key-wall-brace lastcol cornerrow 0 -1 br lastcol cornerrow 1 0 br)))) 576 | 577 | (def case-walls 578 | (union 579 | right-wall 580 | ; back wall 581 | (for [x (range 0 ncols)] (key-wall-brace x 0 0 1 web-post-tl x 0 0 1 web-post-tr)) 582 | (for [x (range 1 ncols)] (key-wall-brace x 0 0 1 web-post-tl (dec x) 0 0 1 web-post-tr)) 583 | 584 | ; left wall/ceiling 585 | (for [y (range 0 lastrow)] (union 586 | (hull (key-place 0 y web-post-tl) 587 | (key-place 0 y web-post-bl) 588 | (left-key-place-squish y 1 web-post) 589 | (left-key-place-squish y -1 web-post)))) 590 | 591 | ; tweeners for left wall/ceiling 592 | (for [y (range 1 lastrow)] (union 593 | (hull (key-place 0 y web-post-tl) 594 | (key-place 0 (dec y) web-post-bl) 595 | (left-key-place-squish y 1 web-post) 596 | (left-key-place-squish (dec y) -1 web-post)))) 597 | ; left/front corner 598 | (wall-brace (partial key-place 0 0) 0 1 web-post-tl (partial left-key-place-squish 100 1) 0 1 web-post) 599 | ;; (wall-brace (partial left-key-place 0 1) 0 1 web-post (partial left-key-place 0 1) -1 0 web-post) 600 | 601 | ; front wall 602 | (key-wall-brace 3 lastrow 0 -1 web-post-bl 3 lastrow 0.5 -1 web-post-br) 603 | (key-wall-brace 3 lastrow 0.5 -1 web-post-br 4 cornerrow 0.5 -1 web-post-bl) 604 | (for [x (range 4 ncols)] (key-wall-brace x cornerrow 0 -1 web-post-bl x cornerrow 0 -1 web-post-br)) ; TODO fix extra wall 605 | (for [x (range 5 ncols)] (key-wall-brace x cornerrow 0 -1 web-post-bl (dec x) cornerrow 0 -1 web-post-br)) 606 | 607 | ;thumb ceiling 608 | ;; (wall-brace thumb-bl-place 0 1 web-post-tr thumb-bl-place 0 1 web-post-tl) 609 | ;; (hull 610 | ;; (thumb-bl-place (translate (wall-locate2 -0.3 1) web-post-tl)) 611 | ;; (thumb-bl-place (translate (wall-locate3 -0.3 1) web-post-tl)) 612 | ;; (thumb-bl-place (translate (wall-locate2 -0.3 1) web-post-tr)) 613 | ;; (thumb-bl-place (translate (wall-locate3 -0.3 1) web-post-tr)) 614 | ;; (thumb-tl-place web-post-tl)) 615 | 616 | 617 | ; thumb walls 618 | (wall-brace thumb-mr-place 0 -1 web-post-br thumb-tr-place 0 -1 thumb-post-br) 619 | (wall-brace thumb-mr-place 0 -1 web-post-br thumb-mr-place 0 -1 web-post-bl) 620 | (wall-brace thumb-br-place 0 -1 web-post-br thumb-br-place 0 -1 web-post-bl) 621 | (wall-brace thumb-br-place -1 0 web-post-tl thumb-br-place -1 0 web-post-bl) 622 | (wall-brace thumb-bl-place -1 0 web-post-tl thumb-bl-place -1 0 web-post-bl) 623 | ; thumb corners 624 | (wall-brace thumb-br-place -1 0 web-post-bl thumb-br-place 0 -1 web-post-bl) 625 | ; thumb tweeners 626 | (wall-brace thumb-mr-place 0 -1 web-post-bl thumb-br-place 0 -1 web-post-br) 627 | (wall-brace thumb-bl-place -1 0 web-post-bl thumb-br-place -1 0 web-post-tl) 628 | (wall-brace thumb-tr-place 0 -1 thumb-post-br (partial key-place 3 lastrow) 0 -1 web-post-bl) 629 | 630 | ; clunky bit on the top left thumb connection (normal connectors don't work well) 631 | ;; (bottom-hull 632 | ;; (left-key-place cornerrow -1 (translate (wall-locate2 -1 0) web-post)) 633 | ;; (left-key-place cornerrow -1 (translate (wall-locate3 -1 0) web-post)) 634 | ;; (thumb-bl-place (translate (wall-locate2 -0.3 1) web-post-tr)) 635 | ;; (thumb-bl-place (translate (wall-locate3 -0.3 1) web-post-tr))) 636 | 637 | ;; (hull 638 | ;; (left-key-place cornerrow -1 (translate (wall-locate2 -1 0) web-post)) 639 | ;; (left-key-place cornerrow -1 (translate (wall-locate3 -1 0) web-post)) 640 | ;; (thumb-bl-place (translate (wall-locate2 -0.3 1) web-post-tr)) 641 | ;; (thumb-bl-place (translate (wall-locate3 -0.3 1) web-post-tr)) 642 | ;; (thumb-tl-place web-post-tl)) 643 | 644 | ;; (hull 645 | ;; (left-key-place cornerrow -1 web-post) 646 | ;; (left-key-place cornerrow -1 (translate (wall-locate1 -1 0) web-post)) 647 | ;; (left-key-place cornerrow -1 (translate (wall-locate2 -1 0) web-post)) 648 | ;; (left-key-place cornerrow -1 (translate (wall-locate3 -1 0) web-post)) 649 | ;; (thumb-tl-place web-post-tl)) 650 | 651 | ;; (hull 652 | ;; (left-key-place cornerrow -1 web-post) 653 | ;; (left-key-place cornerrow -1 (translate (wall-locate1 -1 0) web-post)) 654 | ;; (key-place 0 cornerrow web-post-bl) 655 | ;; (thumb-tl-place web-post-tl)) 656 | 657 | ;; (hull 658 | ;; (thumb-bl-place web-post-tr) 659 | ;; (thumb-bl-place (translate (wall-locate1 -0.3 1) web-post-tr)) 660 | ;; (thumb-bl-place (translate (wall-locate2 -0.3 1) web-post-tr)) 661 | ;; (thumb-bl-place (translate (wall-locate3 -0.3 1) web-post-tr)) 662 | ;; (thumb-tl-place web-post-tl)) 663 | (wall-brace thumb-bl-place -1 0 web-post-tl thumb-bl-place -1 1 web-post-tl) 664 | (triangle-hulls 665 | (thumb-tl-place web-post-tl-squish) 666 | (thumb-tl-place web-post-tl) 667 | (thumb-bl-place web-post-tr) 668 | ) 669 | 670 | (triangle-hulls 671 | (thumb-tl-place web-post-tl-squish) 672 | (thumb-bl-place web-post-tr) 673 | (thumb-bl-place web-post-tl) 674 | ) 675 | 676 | (triangle-hulls 677 | (thumb-bl-place (translate [-1.7 2.6 0.90] web-post-tl)) 678 | (thumb-bl-place web-post-tl) 679 | (thumb-bl-place (translate [-3 2 -1] web-post-tl)) 680 | ) 681 | 682 | 683 | (triangle-hulls 684 | (thumb-bl-place (translate [-1.7 2.6 0.90] web-post-tl)) 685 | (thumb-bl-place web-post-tl) 686 | (thumb-tl-place web-post-tl-squish) 687 | ) 688 | 689 | )) 690 | 691 | (def usb-holder-ref (key-position 0 0 (map - (wall-locate2 0 -1) [0 (/ mount-height 2) 0]))) 692 | 693 | (def usb-holder-position (map + [17 15 0] [(first usb-holder-ref) (second usb-holder-ref) 2])) 694 | (def usb-holder-cube (cube 15 12 2)) 695 | (def usb-holder-space (translate (map + usb-holder-position [0 (* -1 wall-thickness) 1]) usb-holder-cube)) 696 | (def usb-holder-holder (translate usb-holder-position (cube 19 12 4))) 697 | 698 | (def usb-jack (translate (map + usb-holder-position [0 10 3]) (cube 15 20 6))) ; the cube defines the shape of the usb port in the wall 699 | 700 | (def pro-micro-position (map + (key-position 0 1 (wall-locate3 -1 0)) [-6 2 -28])) 701 | (def pro-micro-space-size [4 10 12]) ; z has no wall; 702 | (def pro-micro-wall-thickness 2) 703 | (def pro-micro-holder-size [(+ pro-micro-wall-thickness (first pro-micro-space-size)) (+ pro-micro-wall-thickness (second pro-micro-space-size)) (last pro-micro-space-size)]) 704 | (def pro-micro-space 705 | (->> (cube (first pro-micro-space-size) (second pro-micro-space-size) (last pro-micro-space-size)) 706 | (translate [(- (first pro-micro-position) (/ pro-micro-wall-thickness 2)) (- (second pro-micro-position) (/ pro-micro-wall-thickness 2)) (last pro-micro-position)]))) 707 | (def pro-micro-holder 708 | (difference 709 | (->> (cube (first pro-micro-holder-size) (second pro-micro-holder-size) (last pro-micro-holder-size)) 710 | (translate [(first pro-micro-position) (second pro-micro-position) (last pro-micro-position)])) 711 | pro-micro-space)) 712 | (def pro-micro-holder-squish 713 | ( rotate (/ π 15) [0 0 -1] (translate [-100 -10 -34.5] (rotate (deg2rad 90) [0 1 0] pro-micro-holder))) 714 | 715 | ) 716 | 717 | (def trrs-holder-size [6.2 10 2]) ; trrs jack PJ-320A 718 | (def trrs-holder-hole-size [6.2 10 6]) ; trrs jack PJ-320A 719 | (def trrs-holder-position (map + usb-holder-position [-13.6 0 0])) 720 | (def trrs-holder-thickness 2) 721 | (def trrs-holder-thickness-2x (* 2 trrs-holder-thickness)) 722 | (def trrs-holder 723 | (union 724 | (->> (cube (+ (first trrs-holder-size) trrs-holder-thickness-2x) (+ trrs-holder-thickness (second trrs-holder-size)) (+ (last trrs-holder-size) trrs-holder-thickness)) 725 | (translate [(first trrs-holder-position) (second trrs-holder-position) (/ (+ (last trrs-holder-size) trrs-holder-thickness) 2)])))) 726 | (def trrs-holder-hole 727 | (union 728 | 729 | ; circle trrs hole 730 | (->> 731 | (->> (binding [*fn* 30] (cylinder 2.55 20))) ; 5mm trrs jack 732 | (rotate (deg2rad 90) [1 0 0]) 733 | (translate [(first trrs-holder-position) (+ (second trrs-holder-position) (/ (+ (second trrs-holder-size) trrs-holder-thickness) 2)) (+ 3 (/ (+ (last trrs-holder-size) trrs-holder-thickness) 2))])) ;1.5 padding 734 | 735 | ; rectangular trrs holder 736 | (->> (apply cube trrs-holder-hole-size) (translate [(first trrs-holder-position) (+ (/ trrs-holder-thickness -2) (second trrs-holder-position)) (+ (/ (last trrs-holder-hole-size) 2) trrs-holder-thickness)])))) 737 | 738 | (defn screw-insert-shape [bottom-radius top-radius height] 739 | (union 740 | (->> (binding [*fn* 30] 741 | (cylinder [bottom-radius top-radius] height))) 742 | (translate [0 0 (/ height 2)] (->> (binding [*fn* 30] (sphere top-radius)))))) 743 | 744 | (defn screw-insert [column row bottom-radius top-radius height offset] 745 | (let [shift-right (= column lastcol) 746 | shift-left (= column 0) 747 | shift-up (and (not (or shift-right shift-left)) (= row 0)) 748 | shift-down (and (not (or shift-right shift-left)) (>= row lastrow)) 749 | position (if shift-up (key-position column row (map + (wall-locate2 0 1) [0 (/ mount-height 2) 0])) 750 | (if shift-down (key-position column row (map - (wall-locate2 0 -1) [0 (/ mount-height 2) 0])) 751 | (if shift-left (map + (left-key-position row 0) (wall-locate3 -1 0)) 752 | (key-position column row (map + (wall-locate2 1 0) [(/ mount-width 2) 0 0])))))] 753 | (->> (screw-insert-shape bottom-radius top-radius height) 754 | (translate (map + offset [(first position) (second position) (/ height 2)]))))) 755 | 756 | (defn screw-insert-all-shapes [bottom-radius top-radius height] 757 | (union (screw-insert 0 0 bottom-radius top-radius height [44 11 0]) ; under y/t key 758 | (screw-insert 0 lastrow bottom-radius top-radius height [9 -45 0]) ; bottom corner, bottom key of first thumb colomn 759 | (screw-insert lastcol lastrow bottom-radius top-radius height [-18 -11 0]) ; bottom 2 key row, outside corner 760 | ;; (screw-insert lastcol 0 bottom-radius top-radius height [-3 6 0]) 761 | (screw-insert lastcol lastrow bottom-radius top-radius height [-3.1 8 0]) ; under ctrl key 762 | (screw-insert lastcol 0 bottom-radius top-radius height [-2 11 0]) ; under esc key 763 | (screw-insert 1 lastrow bottom-radius top-radius height [5 -22.5 0]))) ; under bottom of middle thumb colomn 764 | 765 | ; Hole Depth Y: 4.4 766 | (def screw-insert-height 4) 767 | 768 | ; Hole Diameter C: 4.1-4.4 769 | (def screw-insert-bottom-radius (/ 2 3)) 770 | (def screw-insert-top-radius (/ 2 3)) 771 | (def screw-insert-holes (screw-insert-all-shapes screw-insert-bottom-radius screw-insert-top-radius screw-insert-height)) 772 | 773 | ; Wall Thickness W:\t1.65 774 | (def screw-insert-outers (screw-insert-all-shapes (+ screw-insert-bottom-radius 1.65) (+ screw-insert-top-radius 1.65) (+ screw-insert-height 1.5))) 775 | (def screw-insert-screw-holes (screw-insert-all-shapes 1.7 1.7 350)) 776 | 777 | (def pinky-connectors 778 | (apply union 779 | (concat 780 | ;; Row connections 781 | (for [row (range 0 lastrow)] 782 | (triangle-hulls 783 | (key-place lastcol row web-post-tr) 784 | (key-place lastcol row wide-post-tr) 785 | (key-place lastcol row web-post-br) 786 | (key-place lastcol row wide-post-br))) 787 | 788 | ;; Column connections 789 | (for [row (range 0 cornerrow)] 790 | (triangle-hulls 791 | (key-place lastcol row web-post-br) 792 | (key-place lastcol row wide-post-br) 793 | (key-place lastcol (inc row) web-post-tr) 794 | (key-place lastcol (inc row) wide-post-tr))) 795 | ;; 796 | ))) 797 | 798 | (def pinky-walls 799 | (union 800 | (key-wall-brace lastcol cornerrow 0 -1 web-post-br lastcol cornerrow 0 -1 wide-post-br) 801 | (key-wall-brace lastcol 0 0 1 web-post-tr lastcol 0 0 1 wide-post-tr))) 802 | 803 | (def model-right (difference 804 | (union 805 | key-holes 806 | pinky-connectors 807 | pinky-walls 808 | connectors 809 | thumb 810 | thumb-connectors 811 | (difference (union case-walls 812 | screw-insert-outers 813 | pro-micro-holder 814 | usb-holder-holder 815 | trrs-holder) 816 | usb-holder-space 817 | usb-jack 818 | trrs-holder-hole 819 | screw-insert-holes 820 | )) 821 | (translate [0 0 -20] (cube 350 350 40)))) 822 | 823 | 824 | (def model-right-squish (difference 825 | (union 826 | key-holes 827 | pinky-connectors 828 | pinky-walls 829 | connectors 830 | thumb 831 | thumb-connectors 832 | (difference (union case-walls 833 | ;; pro-micro-holder-squish 834 | ;; screw-insert-outers 835 | ) 836 | screw-insert-holes 837 | )) 838 | 839 | (translate [0 0 -20] (cube 350 350 40)))) 840 | 841 | 842 | (def model-left-squish (difference 843 | (union 844 | key-holes 845 | pinky-connectors 846 | pinky-walls 847 | connectors 848 | thumb 849 | thumb-connectors 850 | (difference (union case-walls 851 | ;; screw-insert-outers 852 | usb-holder-holder 853 | ) 854 | usb-holder-space 855 | usb-jack 856 | screw-insert-holes 857 | )) 858 | (translate [0 0 -20] (cube 350 350 40)))) 859 | 860 | 861 | 862 | (spit "things/right.scad" 863 | (write-scad 864 | (union 865 | (translate[ 87 0 0] ( rotate (/ π 15) [0 0 1] model-right-squish)) 866 | (translate[ -87 0 0] ( rotate (/ π 15) [0 0 -1] (mirror [-1 0 0] model-left-squish))) 867 | ))) 868 | 869 | (spit "things/left.scad" 870 | (write-scad (mirror [-1 0 0] model-right))) 871 | 872 | (spit "things/right-test.scad" 873 | (write-scad 874 | (difference 875 | (union 876 | key-holes 877 | pinky-connectors 878 | pinky-walls 879 | connectors 880 | thumb 881 | thumb-connectors 882 | case-walls 883 | thumbcaps 884 | caps) 885 | 886 | (translate [0 0 -20] (cube 350 350 40))))) 887 | 888 | 889 | (def thumbcaps-fill 890 | (union 891 | (thumb-1x-layout (flat-cap 1)) 892 | (thumb-15x-layout (rotate (/ π 2) [0 0 1] (flat-cap 1))))) 893 | 894 | (def caps-fill 895 | (apply union 896 | (for [column columns 897 | row rows 898 | :when (or (.contains [2 3] column) 899 | (not= row lastrow))] 900 | (->> (flat-cap (if (and (true? pinky-15u) (= column lastcol)) 1.5 1)) 901 | (key-place column row))))) 902 | 903 | 904 | (defn bottom [height p] 905 | (->> (project p) 906 | (extrude-linear {:height height :twist 0 :convexity 0}) 907 | (translate [0 0 (- (/ height 2) 10)]))) 908 | 909 | (def right-plate-squish 910 | (union 911 | pinky-connectors 912 | key-holes 913 | thumbcaps-fill 914 | caps-fill 915 | pinky-walls 916 | connectors 917 | thumb 918 | thumb-connectors 919 | case-walls)) 920 | 921 | (def right-plate-squish-thick 922 | (difference 923 | (translate [0 0 10] 924 | (bottom 2.5 right-plate-squish)) 925 | screw-insert-holes) 926 | ) 927 | 928 | 929 | (spit "things/squish-plate.scad" 930 | (write-scad 931 | (union 932 | (translate[ 87 0 0] ( rotate (/ π 15) [0 0 1] right-plate-squish-thick)) 933 | (translate[ -87 0 0] ( rotate (/ π 15) [0 0 -1] (mirror [-1 0 0] right-plate-squish-thick))) 934 | ))) 935 | 936 | 937 | (spit "things/right-plate.scad" 938 | (write-scad 939 | (cut 940 | (translate [0 0 -0.1] 941 | (difference (union case-walls 942 | pinky-walls 943 | screw-insert-outers) 944 | (translate [0 0 -10] screw-insert-screw-holes)))))) 945 | 946 | (spit "things/test.scad" 947 | (write-scad 948 | (difference trrs-holder trrs-holder-hole))) 949 | 950 | (defn -main [dum] 1) ; dummy to make it easier to batch 951 | -------------------------------------------------------------------------------- /tags: -------------------------------------------------------------------------------- 1 | !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ 2 | !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ 3 | !_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ 4 | !_TAG_PROGRAM_NAME Exuberant Ctags // 5 | !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ 6 | !_TAG_PROGRAM_VERSION 5.8 // 7 | -------------------------------------------------------------------------------- /things/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SolidHal/btrfly-keyboard/ffd352c1231df5dd64ccd41f1b3cddc41a128a04/things/.gitkeep -------------------------------------------------------------------------------- /things/test.scad: -------------------------------------------------------------------------------- 1 | difference () { 2 | union () { 3 | translate ([-65.26683897487581, 24.254647206382906, 2]) { 4 | cube ([10.2, 12, 4], center=true); 5 | } 6 | } 7 | union () { 8 | translate ([-65.26683897487581, 30.254647206382906, 5]) { 9 | rotate (a=90.0, v=[1, 0, 0]) { 10 | cylinder ($fn=30, h=20, r=2.55, center=true); 11 | } 12 | } 13 | translate ([-65.26683897487581, 23.254647206382906, 5]) { 14 | cube ([6.2, 10, 6], center=true); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /wiring.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SolidHal/btrfly-keyboard/ffd352c1231df5dd64ccd41f1b3cddc41a128a04/wiring.jpeg --------------------------------------------------------------------------------