aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMakotoKurauchi <pluis@me.com>2020-09-30 06:46:49 +0900
committerGitHub <noreply@github.com>2020-09-30 06:46:49 +0900
commit8b90822f6e707830904426dc05501bffcb69ec18 (patch)
treea4745d9f72c5bf09a5cf2e0d76a1ccc89fed5754
parent9f36aa640e9580354928d72d87187d6c80c69bc4 (diff)
downloadfirmware-8b90822f6e707830904426dc05501bffcb69ec18.tar.gz
firmware-8b90822f6e707830904426dc05501bffcb69ec18.tar.bz2
firmware-8b90822f6e707830904426dc05501bffcb69ec18.zip
add tester keymaps for yushakobo/quick7 (#10282)
* update "Hardware Availability" * add a section of "How to build" * update "Hardware Supported" * add tester keymaps for yushakobo/quick7 * update license headers in keymaps/tester/config.h Co-authored-by: keyaki-namiki <28521374+keyaki-namiki@users.noreply.github.com>
-rw-r--r--keyboards/yushakobo/quick7/keymaps/tester/config.h27
-rw-r--r--keyboards/yushakobo/quick7/keymaps/tester/keymap.c157
-rw-r--r--keyboards/yushakobo/quick7/keymaps/tester/readme.md12
3 files changed, 196 insertions, 0 deletions
diff --git a/keyboards/yushakobo/quick7/keymaps/tester/config.h b/keyboards/yushakobo/quick7/keymaps/tester/config.h
new file mode 100644
index 000000000..b9a075bfe
--- /dev/null
+++ b/keyboards/yushakobo/quick7/keymaps/tester/config.h
@@ -0,0 +1,27 @@
+/*
+Copyright 2020 yushakobo
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#undef RGBLIGHT_LIMIT_VAL
+#define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level */
+#define RGBLIGHT_LAYERS
+#define RGBLIGHT_MAX_LAYERS 4
+#define RGBLIGHT_LED_MAP {\
+ 0, 1, 2,\
+ 5, 4, 3,\
+ 6, 7, 8,\
+ 9, 10, 11, 12\
+}
diff --git a/keyboards/yushakobo/quick7/keymaps/tester/keymap.c b/keyboards/yushakobo/quick7/keymaps/tester/keymap.c
new file mode 100644
index 000000000..57e4a28f3
--- /dev/null
+++ b/keyboards/yushakobo/quick7/keymaps/tester/keymap.c
@@ -0,0 +1,157 @@
+/* Copyright 2020 yushakobo
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#include QMK_KEYBOARD_H
+
+#define FAVORITE_COLOR HSV_CYAN
+
+// Defines names for use in layer keycodes and the keymap
+enum layer_names {
+ _BASE
+};
+
+// Defines the keycodes used by our macros in process_record_user
+enum custom_keycodes {
+ YUSHAURL = SAFE_RANGE,
+ KEY_00,
+ KEY_01,
+ KEY_02,
+ KEY_10,
+ KEY_11,
+ KEY_12,
+ KEY_20,
+ KEY_21,
+ KEY_22
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Base */
+ [_BASE] = LAYOUT(
+ KEY_00, KEY_01, KEY_02,
+ KEY_10, KEY_11, KEY_12,
+ KEY_20, KEY_21, KEY_22
+ )
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case KEY_00:
+ if (record->event.pressed) {
+ rgblight_sethsv_at(FAVORITE_COLOR, 0);
+ } else {
+ rgblight_sethsv_at(HSV_WHITE, 0);
+ }
+ break;
+ case KEY_01:
+ if (record->event.pressed) {
+ rgblight_sethsv_at(FAVORITE_COLOR, 1);
+ } else {
+ rgblight_sethsv_at(HSV_WHITE, 1);
+ }
+ break;
+ case KEY_02:
+ if (record->event.pressed) {
+ rgblight_sethsv_at(FAVORITE_COLOR, 2);
+ } else {
+ rgblight_sethsv_at(HSV_WHITE, 2);
+ }
+ break;
+ case KEY_10:
+ if (record->event.pressed) {
+ rgblight_sethsv_at(FAVORITE_COLOR, 3);
+ } else {
+ rgblight_sethsv_at(HSV_WHITE, 3);
+ }
+ break;
+ case KEY_11:
+ if (record->event.pressed) {
+ rgblight_sethsv_at(FAVORITE_COLOR, 4);
+ } else {
+ rgblight_sethsv_at(HSV_WHITE, 4);
+ }
+ break;
+ case KEY_12:
+ if (record->event.pressed) {
+ rgblight_sethsv_at(FAVORITE_COLOR, 5);
+ } else {
+ rgblight_sethsv_at(HSV_WHITE, 5);
+ }
+ break;
+ case KEY_20:
+ if (record->event.pressed) {
+ rgblight_sethsv_at(FAVORITE_COLOR, 6);
+ } else {
+ rgblight_sethsv_at(HSV_WHITE, 6);
+ }
+ break;
+ case KEY_21:
+ if (record->event.pressed) {
+ rgblight_sethsv_at(FAVORITE_COLOR, 7);
+ } else {
+ rgblight_sethsv_at(HSV_WHITE, 7);
+ }
+ break;
+ case KEY_22:
+ if (record->event.pressed) {
+ rgblight_sethsv_at(FAVORITE_COLOR, 8);
+ } else {
+ rgblight_sethsv_at(HSV_WHITE, 8);
+ }
+ break;
+ }
+ return true;
+}
+
+void encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) { // Left encoder
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ }
+ else if (index == 1) { // Right encoder
+ if (clockwise) {
+ rgblight_decrease_hue_noeeprom();
+ } else {
+ rgblight_increase_hue_noeeprom();
+ }
+ }
+}
+
+const rgblight_segment_t PROGMEM quick7_capslock[] = RGBLIGHT_LAYER_SEGMENTS(
+ {9,1,FAVORITE_COLOR},
+ {12,1,FAVORITE_COLOR}
+);
+const rgblight_segment_t PROGMEM quick7_numlock[] = RGBLIGHT_LAYER_SEGMENTS(
+ {10,1,FAVORITE_COLOR},
+ {11,1,FAVORITE_COLOR}
+);
+
+const rgblight_segment_t* const PROGMEM quick7_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
+ quick7_capslock,
+ quick7_numlock
+);
+
+void keyboard_post_init_user(void){
+ rgblight_layers = quick7_rgb_layers;
+ rgblight_sethsv(HSV_WHITE);
+}
+
+bool led_update_user(led_t led_state){
+ rgblight_set_layer_state(0, led_state.caps_lock);
+ rgblight_set_layer_state(1, led_state.num_lock);
+ return true;
+} \ No newline at end of file
diff --git a/keyboards/yushakobo/quick7/keymaps/tester/readme.md b/keyboards/yushakobo/quick7/keymaps/tester/readme.md
new file mode 100644
index 000000000..41ba72ffc
--- /dev/null
+++ b/keyboards/yushakobo/quick7/keymaps/tester/readme.md
@@ -0,0 +1,12 @@
+# The default keymap for quick7
+
+### Base Layer
+
+|Left/Right|Clockwise|Counter Clockwise|
+|---|---|---|
+|Left|Vol+|Vol-|
+|Right|RGB HUE-|RGB HUE+|
+
+No input at all. You can just test how deep the key's actuation point is, and when does the key releases.
+
+4 underglow LEDs indicates the status of CapsLock and NumLock.
#n469'>469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999