-
-
Notifications
You must be signed in to change notification settings - Fork 39.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates send_string functionality, adds terminal feature #1657
Conversation
Hi Jack, I really like the idea of a terminal for qmk. However, I'm getting some errors.
|
Ah, currently this only works with the basic keycodes - support for all of them is possible, but it might be kinda messy! |
That makes sense, because I have my space bar on LT(). KC_SPACE works as it should 👍 |
see qmk_firmware pr #1657:qmk/qmk_firmware#1657
Today I have been messing with making the arrow keys work in terminal mode. Up/Down are very difficult to work with, so for the moment I haven't touched them, but I have added left/right support. They will work just fine so long as the user does not move the cursor using the mouse. I also added home/end support, so when they press "home," it moves to after the The way I have implemented them is by using a cursor location integer, which corresponds to the index in the buffer that they want to type into. For example, when they type normally (i.e. don't use the arrow keys) they cursor location is always equal to I am going to test this all tonight when I have access to my keyboard, but for the moment I have implemented these changes as they are now. After I confirm that they work, should I open a pull request (this would add my Preonic keymap as well)? I am trying to participate in Hacktoberfest and this seems to be the only open source project I care about, and the terminal feature could use some help 😄 |
@willeccles awesome! A PR would be great :) |
Will test this weekend when I have a chance! |
* rgblight support for ps2avrGB * Simplified ps2avrGB rgblight_set logic a bit * Added a build flag for using a custom rgblight driver * Fixed rgblight_types.h * Always send 3 * RGBLED_NUM bytes through I2C on ps2avrGB This wasn't going to work on boards with a different number of LEDs, since I was always sending 48 bytes. * Fixed indentation and now using quantum keycodes for rgblight * adds a default ergodox_infinity keymap * fix for toggle tap dance * Basic support for JM60 keyboard This adds basic support for JM60 RGB PCB that was sold by KBDfans https://kbdfans.myshopify.com/ https://www.aliexpress.com/store/product/JM60-RGB60-Custom-mechanical-keyboard-PCB-ANSI/2230037_32810956675.html No support for RGB Backlight yet. * Use KC_GESC keycode instead of custom function * Changed USB manufacturer to "JMWS" Don`t know, if this is 100% correct, but the original software refers to "JMWS JM60 Driver". * Update tv44-belak keymap * Updates send_string functionality, adds terminal feature (qmk#1657) * implement basic terminal stuff * modify send_string to read normal strings too * add files bc yeah. working pgm detected * pgm detection apparently not working * adds send string keycodes, additional keycode support in send string * implement arguments * [terminal] add help command * [terminal] adds keycode and keymap functions * [terminal] adds nop.h, documentation * update macro docs * Add jojiichan keymap * [planck] Adds Sean Hunter keymap(qmk#1706) * Sean Hunter initial keymap * Update old map to sync it up with new one * Add TODO fix a few minor things * small doc fixes * Minor fixups * updated read.md file * Add support for MF68 replacement PCB for Magicforce 68 (qmk#1698) * Port TMK code for MF68 * Change KEYMAP to KC_KEYMAP and add macro * Further updated ergodone readme.md (qmk#1714) * updated read.md file * added image to flash hex on ergodone * corrected image link * updated direct image link * image with larger text * Some revisions to cbbrowne Planck keymap, and a preliminary xd75 keymap (qmk#1715) * Add HOME/END keys as upper/lower on arrow-up/down * Reduce .hex file size by turning off unneeded options * Put digit keypad onto left hand upon RAISE; this will sometimes be preferable to double-hits of right hand * Latest super latest version merge * cbbrowne keymap for XD75re * starting notes on XD75re keymap plans * First draft of bottom row of QWERTY * Switch my special bottom line over to QCENT * Dunno * Filling in wanted keys, bit by bit... * Add copyright, extra macro * Clean up comments, remove some experimental code I didn't like * TODO plans for xd75re * clean up keyboard layout * QCENT2 is my new experiment for the main keyboard... * Add a few more main layer keys, and modify LOWER to shift things outwards to conform with main layer * Clean up RAISE layer to conform with main layer, remove QCENT layer as QCENT2 is the new thing * More xd75 changes, now that I actually have it in hand * shift keymap around, as original attempt was a bit too aggressive in keeping to the edges * more revs to XD75 * Dropping parts of the centre keypad in favor of Keys I Really Need * Improve documentation to conform with how builds are done now * Improve documentation to conform with how builds are done now * Add cbbrowne rules file as alternative to having the rules in Makefile * Makefile not needed anymore for individual keymap * Adapt build instructions to new keyboard name * Remove accidentally pasted line in MF68 readme * "New" Atreus Keymap (qmk#1717) * Merge with upstream * Finish merge * Add new keymap * Change use of KEYMAP macro * Add Readme.md * Fix link * Clean up comments * Raise on leading edge of keypress * Add Levinson keyboard (qmk#1723) * Fork lets_split to levinson Update subproject default * Update Readme * Pass LED backlight info from master to slave over serial * Cleaned, revised, and updated my keymaps to reflect new changes/defaults (qmk#1712) * add new RGB keycodes and clean up lets split keymap * extraneous cases * More cleanup and added macro * one more macro * cleaned up my planck keymap and added macros * Transitioned planck keymap to new formatting / audio modes based on new default * Remove extraneous newline in song list, add keycodes missed in previous commit * error in graphical representation of keycodes * Update Mechmini keymap, reduce reported power consumption for iOS Camera Adapter compatibility * Wording changes for the WSL install script * Adding Ergodox EZ and Atreus Dvorak 42-key layouts (qmk#1705) * importing 42 key dvorak layout * added comment for build instructions * adding atreus dvorak 42 key layout * added readme * add readme * build instructions * additional MEH shortcuts * Updated README in ergodox_infinity keyboard (qmk#1702) * changed 'infinity' to 'ergodox_infinity' and specified to be in the top-level directory as per recent changes to directory structure of QMK_firmware git repo * accidently removed '-' in last line of readme * [core] fix rgb source include * Got luizribeiro's ps2avrgb implementation working for Mechmini * Change max brightness level for iOS * Update on/off toggle behaviour for RGB LEDs * Fixes for RGB, more colours * Keymap updates * Add RGB code (from ps2avrgb and luizribeiro/qmk_firmware) * Updated RGB code to use event.pressed * Improve readme and PID codes for Atreus. * Address issue qmk#1713 (qmk#1728) * Remove redundant Makefile. * Added Auto Shift, tap key = normal, hold key = shifted state. * KC_TILD should not have been listed as an auto shift key * Fixed a few typos and spelling errors in auto shift feature document * Adding a new layout for the planck that helps when coming from the pok3r (qmk#1701) * adding new layout for the planck that helps when coming from the pok3r * Fixing the function layer * Update readme.md * Update keymap.c Making some small adjustments * Update keymap.c switching GUI and Esc * Update keymap.c * Fixed uk78 and turned Bootmagic off (qmk#1725) * Add files via upload * Update readme.md * Update readme.md * Add files via upload * Add files via upload * Update config.h * convert to unix line-endings [skip ci] * adds DZ60 support (qmk#1734) * adds support for dz60 * fix dz60 readme * Instruct VSCode to indent using spaces, also ignore two temp files created by VSCode. * add layout mitosis-datagrok (workman variant) * Adding my keymap with Colemak Mod-DH * Turkish planck keymap (qmk#1675) * Adding keymap * Adding keymap * Compiles now, but doesn't flash * Fixes issues with compilation * Trying to fix issues with tap-dance layer * Trying to fix issues with tap-dance layer * Trying to fix issues with tap-dance layer * Fixed bbaserdem layout * Added keyboard layout image * Edited README.md * Changed layout and removed image from README.md * Changed tapping terms * Changed layout a bit * move keymap to rules.mk * add filess * Clone Nyquist keyboard for Viterbi * Rename cloned Nyquist files to Viterbi, create temporary keymaps Add WIP keymap for dwallace * Update default Viterbi layout * Adjust Viterbi pinout * Update Viterbi keymaps * Contribute a DZ60 keymap for 67 key configuration * add conditional for planck-mitch keymap * updated keycodes media descriptions Platform compatibility descriptions added for mute, volume up/down * platform descriptions to match master keycodes.md documentation * Fixed typo of "multually" to "mutually" * Add shell.nix for NixOS users * Add my gherkin keymap, and update readme and config * Removed unneeded code from keymap * XD75RE Custom layout, and clarification in readme.md (qmk#1754) * Duplicate default layout as basis of my own * Basic Colemak layer, just to practice flashing * Add reset button so that we don't have to short out the reset button on the board to flash it. * Symbols layer * Navigation layer, and remove unused keys. Now usable, nice. * Correct backspace for UK QWERTY mapping * Small clarification in XD75RE readme instructions * Use UK pipe so that I can type a pipe on a UK keyboard * Update Viterbi default layout (qmk#1753) * Implement sticky modifiers * Change underglow based on sticky mod status * Set RGB lights based on which mods are stickied * Add controls for dimming RGB LEDs * Only update RGB lights if modifiers have changed * Use all LEDs to show modifier state * Create default keymap for Viterbi * Move work from pinky fingers to thumbs and index fingers (qmk#1749) * phreed keymap added This keymap moves many pinky keys to the center * set to do what I want but LT() does not return to previous layer * get overlays working * get overlays working * fix the readme * fix the readme * swapped the shift * swapped the shift * propagate mods * clear special char on readme * New layout for XD60/64 (qmk#1748) * Add yuuki keymap Documentation is still a TODO and the keymap may not be final * GRV on colon * add KC_GRV to FN ESC * hhkb ish * hhkbish 2 * HHKBish and documentation * Fix Markdown warnings * typo * Added Obelus tearing it down so that it can be rebuilt fiddling with audio big default config overhaul apparently startup sounds work without the override now readme! readme fixes readme tweaking * `?=` -> `=` * remove all makefiles from keyboard directories * Support for KBP V60 Type R 60% keyboard (qmk#1770) * Support for KBP V60 Type R 60% keyboard Support does not include in switch or underglow lighting for Polestar Edition. * rename v60type_r to v60_type_r * Remove old v60type_r * Modify readme.md to adhere with QMK readme formatting. * updated drashna's keymaps (qmk#1769) * Add woodpad * Cleanup * Remove misc layouts for woodpad * Move woodpad to handwired * Updated RGB Underglow info * added matrixman layout * Clueboard 60% support (qmk#1746) * initial clueboard_60 support * LED lighting support * fix the clueboard->clueboard_66 rename * Add layout support to clueboard_60 * Fix the 60_iso layout so it's actually iso * add a default keymap for AEK layout * fix clueboard_17 * Fixup the ISO layouts * Fix the `wait_ms()/wait_us()` definitions for chibios * Fix up the wait_ms/wait_us hack. Reduce stack size. * Add a missing #include "wait.h" * commit files that should have already been comitted * Fix HSV Color Wheel image on RGB Light page (qmk#1773) Signed-off-by: Max Riveiro <kavu13@gmail.com> * Don't process keycodes on the slave * Fix dynamic macros on ChibiOS keyboards * Add new planck layout (qmk#1778) * Custom layout: tehwalris * Prevent stuck modifiers. * code_friendly_qwerty keymap * ergodox: Update algernon's layout to v1.11 Overall changes =============== * Updated to work with QMK master. * The `$` and `^` symbols on the number row were swapped on both the base and the ADORE layers. * The bracket tap-dance keys can now be used to input Japanese brackets, `「` and `」` with a third tap. * The second column of the top row on the right side will act as a "Social" application selector on the `AppSel` layer. * The third key on the same column will select a password manager. * The `GUI` key will now launch `rofi` when triple-tapped. Miscellaneous ============= * The `👶` symbol can be entered with UCIS. * The `👪` symbol can be entered with UCIS. Tools ===== * `tools/hid-commands` can now find the `Mstdn`, not just `Slack`, as the "Slack"/chat app. * `tools/hid-commands` can now find the Plex web app as a music/media player. * `tools/hid-commands` now understands the "Social" application selector. It raises the `Mstdn` and `Tweetdeck` windows, but keeps focus on the previous window. * `tools/hid-commands` now understands the "Social2" application selector, which raises `Signal` and `Viber`, but keeps focus on the previous window. * `tools/hid-commands` is now able to select a password manager (KeePass*). * `tools/hid-commands` can now run `rofi` when receiving an `appsel_helper` command (triggered by a triple-tapped `GUI` key). Signed-off-by: Gergely Nagy <algernon@madhouse-project.org> * Reference to rules.mk in tap dance docs added Change-Id: I64aa6f95a30ab05f0ed3f499e54b9e125d379fad * Mbsurfer Let's Split keymap updates (qmk#1787) * Fix mbsurfer let's split layout RGB indicators when both lower and raise are pressed * Update mbsurfer let's split keymap with new RGB key codes for modes * Clean up mbsurfer keymap matrix layout * Edited a minor typo in feature_bootmagic.md. * Minor typo * Adding my Roadkit keymap (qmk#1798) * Initial khord roadkit keymap * Remove bad readme * Transfer dot through to layer 2 and add clarifications to layout comments * [cleanup] consistent 2 space indentation Was mixed between 2&4 * Update Let's Split readme Updated Let's Split readme to reflect `make` changes in qmk#1659, removed incorrectly used apostrophe and other spelling / grammar errors * Add new 4x12 ortho layout & add credit to XD75 port (qmk#1782) * add xd75, preliminary RGB' * fix RGB * add backlight support (probably) * updated readme and tweaked keymap * added xd75 to list in /keyboards * copyright ALL the things, create blank slate for Colemak Mod-DH Split/Wide keymap * Add preliminary split Colemak Mod-DH layout * changing stuff to compile properly * attribution * moar attribution * removed incomplete keymap * Create Colemak Mod-DH Wide layout for 4x12 ortho. * Move Adjust key * Add layou timage to readme * fix naming * Fix stupid issue with not understanding how the keymap works * forgot to switch COLEMAK to COLEMAKDH... * Remove and link image * Remove and link image * Generic Pointing Device (qmk#1767) * Increase one-shot timeout for planck/keymaps/dshields and remove unused includes. * Consistent fabian layouts for amj40, let's split, planck and xd75 (qmk#1812) * slight modifier changes; added plover and reusing jack's default planck keymap as the basis * space is not shift when held anymore * added fabian layout (based on jack's default) * changed fabian layout (based on jack's default) * changed fabian layout (based on jack's default) * Fix Clueboard readme links (qmk#1816) * correct layer numbers in keymaps * correct extraneous t * Fixed typo in docs. (qmk#1818) * Add my layouts (qmk#1822) * all of my updates * return to base config for xd60.c * remove janky keymap header definition * update readme for xd60 * update Planck readme * Contribute GH60 layout (qmk#1820) * Add first version of my layout * Tweaked layout * gh60/bluezio: SpaceFn CapsLock interferes with Ctrl+Arrows * Added Dichotemy Keyboard, updated docs for Pointing Device (qmk#1817) * Added Dichotemy Keyboard, updated docs for Pointing Device * Updated readme * Updated mouse report pointer in pointing_device.c * Added ISO Hungarian friendly keymap (qmk#1808) * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Update keymap.c * Update keymap.c * Update keymap.c * Update keymap.c * Qwerty Code Friendly: relocate insert key This was too easy to press by accident (next to Alt). Make this user configurable. * neue Datei: keyboards/lets_split/keymaps/DE_simple/Makefile neue Datei: keyboards/lets_split/keymaps/DE_simple/config.h neue Datei: keyboards/lets_split/keymaps/DE_simple/keymap.c neue Datei: keyboards/lets_split/keymaps/DE_simple/rules.mk * geändert: keyboards/lets_split/keymaps/DE_simple/keymap.c * neue Datei: readme.md * geändert: keymap.c * geändert: readme.md * geändert: readme.md * Cleanup of my keymaps (qmk#1802) * Add woodpad * Cleanup * Remove misc layouts for woodpad * Move woodpad to handwired * Updated RGB Underglow info * Cleanup macros * Fix odd merge issue * Tweaked RGB lighting stuff * Start to merge orthodox/ergodox keymaps (persistant layers) * Add forced NKRO * Added Colemak and Dvorak layers to default orthodox keymap * Added default layer (qwerty/colemak/dvorak) detection to RGB Underglow * Updated my Gherkin Keymap * ErgoDone keyboard: Improved structure of readme and augmented it with important information. Updated links to moved content. * qmk#1792 added in waits from tmk for locking switches fixes qmk#1792 * Fix missing teensy path * Add option to reverse PS2 mouse axes and scrolling * add stock layout for xd75 (qmk#1731) * add stock layout for xd75 * fix layout bug * layout naming * don't need it * Cleaning up * newkb-atreus-xk * Write a contributing guide. (qmk#1827) * Fix the presentation of the contribution guide
send_string
updatessend_string()
has been moved tosend_string_P()
, where it accesses the strings from program space -send_string()
now pulls from flash memory. The helper functions work similarly with_P
- there's some redundancy here with the tap/down/up functionality, but that can be reworked in the future.SEND_STRING()
is now a shortcut for the_P
function, so nothing should break (I don't think anyone was using it directly).With these changes, you can now enter any keycode into the function, like this:
Which will tap (down & up)
KC_HOME
.Keycodes have a
X_
prefix because of some pre-processor magic - these have different values than normalKC_
keycodes, and not all keycodes were copied over (0 - 0x98 + mods), but all are one byte (< 256), which is what allows us to get away with this.All current functions available are:
SS_LCTRL
and similar functions act differently, and can take strings as arguments - I'm open to some naming suggestions here, for these functions, but also theX_
prefix (this was chosen because it's the hex code without a0x
).These functions are a little odd syntactically, and can be combined/concat'd with literal strings, like this:
Which makes things a bit easier when you wanna do everything all in one line.
Terminal feature
This is a fun little thing I was messing with, and the reason the send_string stuff happened - check out the docs of it here.
Some things worth talking about in the future: