? Yttria's Keyboard Adapter for Citra SmileBASIC ● SmileBASIC Source

Sign In

Register
*Usernames are case-sensitive
Forgot my password

Yttria's Keyboard Adapter for Citra SmileBASIC

Table of Contents:
  • Download
  • Commands Global keys Commands during normal keyboard mode Search mode navigation Select mode commands Controller mode Dialog mode
  • Future Plans
  • Footnotes ~~~~~~~~ This is a fork of ColeslawProductions' script which in turn is a reimagining of TheV360's original AutoHotkey script. This is an AutoHotkey script (sorry, Windows only1) that builds on its predecessors to provide a mapping from the OS keyboard layer to SmileBASIC's software keyboard in citra-emu by sending mouse events. Some features include:
    1. Switching between controller mode and keyboard mode
    2. Respecting user button configuration (with one recommendation)
    3. Support for file save dialog
    4. Typical text editor command access: copy/paste/save/find etc.
    5. Text selection
    6. Slot navigation
    It is highly recommended that you map the D-Pad buttons to the arrow keys prior to using the script. For an even more convenient way to edit SmileBASIC programs on a PC for use with Citra, please check out smilebasic-mode for emacs.

    Download

    The project is available at https://github.com/y-ack/citra-smilebasic-keyboard A binary for 64-bit Windows systems can be downloaded from releases The script assumes that you have a key profile defined and that qt-config.ini is in SmileBASIC's appdata directory. Please use Ctrl+LeftClick to define the top left corner of the touch screen and Ctrl+RightClick to define the bottom right corner of the touch screen on running the adapter.

    Commands

    It is highly recommended that you map the D-Pad buttons to the arrow keys prior to using the script.
    1. Table of Contents:
    2. Global keys
    3. Commands during normal keyboard mode
    4. Search mode navigation
    5. Select mode commands
    6. Controller mode
    7. Dialog mode
    This guide uses Emacs key notation. slash / indicates either-or. | prefix | meaning | |--------+-----------| | C | "Control" | | M | "Alt" | | S | "Shift" |

    Global

    calibration must be performed before anything else C-Mouse1 - calibrate touchscreen top left C-Mouse2 - calibrate touchscreen bottom right M-x - toggle Controller Mode CapsLock - switch keyboard case M-Left - previous slot M-Right - next slot

    Keyboard Mode

    normal keys - insert text backspace - backspace <RETURN> - insert newline C-s - save slot (enable Dialog Mode) C-o - open file in slot C-v - paste C-z - undo C-y - redo C-Left, home - beginning of line C-Right, end - end of line C-Up, PgUp - scroll up C-Down, PgDn - scroll down C-f - enable Search Mode C-S-H - enable Search Mode with replace on M-. - jump to definition (Search Mode) C-<SPACE> - enable Select Mode S-arrows - Select and move F1-F5 - function keys F6 - direct mode F7-F10 - slot 0-3 C-/, C-' - make current line a comment M-w - insert WHILE WEND (experimental) M-i - insert IF THEN (experimental) M-l - insert ELSEIF THEN (experimental) C-h - toggle SB help

    Search Mode

    normal keys - enter search/replace query C-, (<) - previous result C-. (>) - next result <RETURN> - commit replace C-h - toggle replace mode C-f - exit Search Mode

    Select Mode

    C-c - copy C-x - cut C-v - paste C-<SPACE> - exit Select Mode motion keys: as expected

    Controller Mode

    keys are unassigned (use Citra settings) except C-<SPACE> - toggle Select Mode

    Dialog Mode

    enabled during file saving valid filename keys enter respective character C-c - cancel <RETURN> - OK backspace - backspace

    Future Plans

    see comments on this page I guess

    Footnotes

    [1] I'm interested in helping port this to GNU+Linux systems. If you know of a possibly appropriate library, please contact me and I'll take a look. other tools: [2]https://github.com/y-ack/smilebasic-mode [3]http://trinitro21.github.io/ [4]http://smilebasicsource.com/forum?ftid=468
Author
Yttria
Updated
Rating
4 votes
Categories
Keywords
  • citra
  • smilebasic
  • programming
  • keyboard
  • files
  • editing
  • emulator
9 Comment(s) MZ952 MZ952 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Drawing I like to draw! Hobbies Reading I like to read books! Hobbies Wait wait. I recently learned what Citra is. Do we have a PC emulated version of SB?? auceps auceps yes, but it's not very convenient. Yttria Yttria Head Admin just dump your copy or whatever MZ952 MZ952 Intermediate Programmer I can make programs, but I still have trouble here and there. Programming Strength Drawing I like to draw! Hobbies Reading I like to read books! Hobbies Why isn't it convenient? You can't save files or something? snail_ snail_ QSP Contest 1 Contest Participant I participated in the first SmileBASIC Source QSP Contest! Helper Received for being very helpful around SmileBASIC Source Achievements Amazing Contributor Someone thinks I'm an awesome person who has done so much for the community! Achievements One thing that sucks about citra is that it doesn't emulate new 3DS. And certain things lag extremely for no reason. Yttria Yttria Head Admin I wouldn't call it "inconvenient" but there are things to be mindful of... You can't download/upload projects Depending on your machine you'll get maybe 50% speed during execution And it won't emulate n3DS correctly Having SB files deep in AppData isn't a problem if you make a soft link. Aris_A Aris_A Beginner Programmer I'm just starting out! I'm still trying to grasp the basics. Programming Strength Night Person I like the quiet night and sleep late. Express Yourself should try sb on citra TheV360 TheV360 Pokemon Is Awesome! I love Pokemon! Express Yourself First Day Joined on the very first day of SmileBASIC Source Website Night Person I like the quiet night and sleep late. Express Yourself Really good, I like how easy it is to set up and how you've added so many useful shortcuts. However, I have two problems with this so far: 1. There's a lot of latency, and my inputs keep getting dropped. This could just be the .exe builds though. 2. I can't easily type exclamation mark from the lowercase keyboard. Maybe mark some keys as requiring the keyboard to be in an uppercase state? Still, I'm glad that people with actual knowledge and experience with AHK are making this, rather than me. Edit: Insane idea: AHK has a function that can read the color of a pixel. Maybe "scan" across the rows of suggestions, find where each suggestion ends, and bind the top 5 suggestions to some other keys? Yttria Yttria Head Admin Hi, thanks for the comment. Not sure about the latency issue. I know I'm not the fastest typist compared to some of my peers on SBS so maybe it just happened to work okay for my typing speed but breaks down with faster input, and when I tried to write a similar script in Powershell a long time ago, timing issues made it unusable... I'm also aware of some timing problems with holding down keys mapped to button presses that cause some weird behavior where I just gave up after manipulating the delay intervals and not seeing any results better than the current values. I would definitely try compiling the script on your own machine. I've thought about the shift-state issue and definitely want to do some things to make it more convenient, but it requires a lot of refactoring and I decided it wouldn't make it into this release. I don't know any AutoHotkey so everything here is what I was able to learn in two days, so I didn't even consider trying to read the screen. I did consider a shortcut to just insert the first text suggestion, but figured it's not really even that useful when it's now faster to type keywords out anyway (at least, on my machine). One thing that might be cool is to turn it into a keylogger keep track of input and be able to construct a word list for the session for tab-completion (better would be too look at the saved program if it exists first, too, but requires user to provide filename). Other things I'd like to add: - either find a way to automatically calculate the screen position (even if just for the default layout) OR save the configuration to a file so that it at least doesn't have to be recalibrated every run. - fix some weird thing where C-s or something is also bound to 'toggle frame advancing' or something that ruins everything - maybe get smilebasic-mode to communicate with it so that files can be loaded/executed with a few keystrokes from emacs