Closed DGCupit closed 3 years ago
ya one a those corpo slimebags? Hope not, hombre, so here's the tutorial mission for hacking (keyboards)...
Put this in your .ini
[LAYER_1]
REWIRE Up W
REWIRE Down S
REWIRE Left A
REWIRE Right D
REWIRE Ret R
REWIRE Home I
REWIRE End e
REWIRE L\ #this is the backslash next to left shift, only on Euro/ISO boards
REWIRE RShf c
REWIRE RCtrl Space
#do the rest of the mappings here
[LAYER_2]
# does nothing. Usually you use ESC+0 = layer_0 to disable capsicain, but ESC+2 is easier to press without taking your hand off the mouse
Two ways to look up the capsicain key labels:
You can't "toggle" capsicain on and off, you can only change layers from "my customized layer 1" to "my standard layer 2", or "do nothing layer 0". Right now changing layers is hardcoded to ESC+(number). I could make it configurable if there's a benefit.
Making a converter... feel free to make one, for the simple key mappings it's probably easy :)
Thanks very much for the reply! No, I'm just a simple gamer trying to work around the ahole devs who decide they will lock or limit keyboard remapping of key controls in PC game releases.
Hmm. For whatever reason, when the app opens, ESC-C and ESC-D do not do anything. The window shows no status changes. It just remains as seen here:
http://picturethisquote.com/Misc/Untitled.png
ESC-X does close the app, but ESC-H does nothing, too.
Okay, I found that if I go back to the default INI, then those keys do work.
I know you're obviously very familiar with your app, so can you tell me what lines to add to my script to make the ESC 1 toggle the remapping on and off? I've looked at your default ini, but I can't find it.
I saw your comment, but I don't understand how to implement it:
[LAYER_2]
# does nothing. Usually you use ESC+0 = layer_0 to disable capsicain, but ESC+2 is easier to press without taking your hand off the mouse
Also, since I'm remapping (swapping) ESC and BACKSPACE, wouldn't that also affect the ESC command for exiting, suspending, etc?
BTW, here's my script.
[LAYER_1]
REWIRE UP W
REWIRE DOWN S
REWIRE LEFT A
REWIRE RIGHT D
REWIRE RET R
REWIRE HOME I
REWIRE END E
REWIRE \ LSHF
REWIRE RSHF C
REWIRE RCTRL SPACE
REWIRE T PGDOWN
REWIRE F INS
REWIRE LALT DEL
REWIRE ESC BSP
REWIRE V NP0
REWIRE Q NP1
REWIRE B NP3
REWIRE LCTRL NP4
REWIRE M NP5
REWIRE G NP7
REWIRE X NP8
REWIRE Z NP9
REWIRE J NP.
REWIRE ENTER NPRET
REWIRE UP W
REWIRE DOWN S
REWIRE LEFT A
REWIRE RIGHT D
REWIRE BSP ESC
#do the rest of the mappings here
[LAYER_2]
# does nothing. Usually you use ESC+0 = layer_0 to disable capsicain, but ESC+2 is easier to press without taking your hand off the mouse
I guess I really don't know what I'm doing. Although I have my script named capsicain.ini, when I start the .exe, none of the mappings seem to be working. But if I return your .ini then those mappings seem to work. Obviously my ini is missing something important.
I can recreate your problem. Thanks for the info. Sorry, you ran into a bug or three. I'll look into this.
Here's your cleaned up script. You can't rewire the escape key until I fix that.
GLOBAL IniVersion version2
GLOBAL ActiveLayerOnStartup 1
[LAYER_1]
OPTION layerName game_config
REWIRE UP W
REWIRE DOWN S
REWIRE LEFT A
REWIRE RIGHT D
REWIRE RET R
REWIRE HOME I
REWIRE END E
REWIRE \ LSHF
REWIRE RSHF C
REWIRE RCTRL SPACE
REWIRE T PGDOWN
REWIRE F INS
REWIRE LALT DEL
#REWIRE ESC BSP
REWIRE V NP0
REWIRE Q NP1
REWIRE B NP3
REWIRE LCTRL NP4
REWIRE M NP5
REWIRE G NP7
REWIRE X NP8
REWIRE Z NP9
REWIRE J NP.
REWIRE RET NPRET
REWIRE UP W
REWIRE DOWN S
REWIRE LEFT A
REWIRE RIGHT D
#REWIRE BSP ESC
[LAYER_2]
OPTION layerName do_nothing
# does nothing. Usually you use ESC+0 = layer_0 to disable capsicain, but ESC+2 is easier to press without taking your hand off the mouse
Note: one more thing: you cannot 'toggle' layers with a single key. You can switch to layer 1 (your config), or switch to layer 2 (do nothing)
Great! Thanks very much. I'll be giving this updated script a try this evening and let you know.
I don't guess the ESC remapping is a huge deal. It just seems like a lot of games have you pressing ESC to close menus and whatnot, and with my need to use the right-side of the keyboard, I suppose I'll just have to get used to reach over to tap that key as well.
Any way to send the ESC key code via another key without actually remapping the ESC key? Like add a 2nd ESC key with your software?
As for the toggle, could a combo mapping be done to send ESC-2 when a single key is pressed? Like make ScrollLock send ESC-2? Does ESC 2 only turn it off? Do you send ESC 1 to turn it on? I'm sure these questions seem stupid.
Thanks for your help!
in Code/x64/Release you can download the latest capsicain.exe v60 Haven't used it much, I'd call it a beta.
With that version you can REWIRE from and to ESC. Just uncomment the two lines in your ini that are commented out.
Note that the physical ESC key is a bit special. You can only rewire it to plain keys. Not sure what would happen if you rewire it to a modifier (it won't work right).
About your other question, what you want is a new function in your .ini, to switch/toggle layers. Like "TAB [...] > switchToLayer (1)" That's not possible today.
What's the use case for needing to "toggle" between two layers? Can you describe a situation where this is better than having two dedicated keys for two layers? (I don't like toggles very much, you need to know where you are before you press the toggle key. ESC+1 gives you layer 1, always, unconditional).
For the on/off - I just got used to AutoHotKey, and its suspend function. I am in the habit of reach up, taping scrolllock, then being able to type as normal (in a chat window, etc) and then when I'm done, I just tap scrolllock again, and the remappings kick in again. Just quicker than clicking esc-1, esc-2. The ScrollLock light also works as an ON/OFF indicator, too.
I found this handy site. It puts an onscreen keyboard and highlights what keys are being pushed:
https://www.keyboardtester.com/
I noticed I had some of my rewire's backwards. AHK uses Remap=Original script entries, and your app uses Original=Remap and I had a mix accidentally. I corrected those and so I think all mappings are working now.
BTW, If I remap ESC to BSP, the onscreen keyboard shows I'm pressing ALL the command keys at once! ALT, CTRL, ESC, etc... So that doesn't work as intended. I'll leave ESC alone, I guess.
Also, I didn't see an answer to my question about the ability to make another key also be an ESC key? Is that possible?
And if anyone cares, this is the final script (no ESC remapping)
GLOBAL IniVersion version2
GLOBAL ActiveLayerOnStartup 1
[LAYER_1]
OPTION layerName game_config
#REWIRE ESC BSP
#REWIRE BSP ESC
REWIRE UP W
REWIRE DOWN S
REWIRE LEFT A
REWIRE RIGHT D
REWIRE RET R
REWIRE HOME I
REWIRE END E
REWIRE \ LSHF
REWIRE RSHF C
REWIRE RCTRL SPACE
REWIRE PGUP TAB
REWIRE PGDOWN T
REWIRE INS F
REWIRE DEL LALT
REWIRE NP0 V
REWIRE NP1 Q
REWIRE NP3 B
REWIRE NP4 LCTRL
REWIRE NP5 M
REWIRE NP7 G
REWIRE NP8 X
REWIRE NP9 Z
REWIRE NP. J
REWIRE NPRET RET
REWIRE UP W
REWIRE DOWN S
REWIRE LEFT A
REWIRE RIGHT D
[LAYER_2]
OPTION layerName do_nothing
# does nothing. Usually you use ESC+0 = layer_0 to disable capsicain, but ESC+2 is easier to press without taking your hand off the mouse
There's a new version 62, I tested the ESC stuff and cleaned up the code. I'm somewhat confident it works correctly now.
You can rewire any key to ESC, that's now clean and simple.
You can rewire ESC to another key, but that comes with 'buts'
The hardware ESC key is a bit special since it must trigger the capsicain commands.
Having scrollLock (with LED, nice) to turn key mapping on/off sounds nice, though. I'll mark that as a possible feature.
Very good! I'll give things a try with the new build and try that ESC to BSP remapping.
done. You can now define
GLOBAL capsicainOnOffKey ScrLock
To turn capsicain ON/OFF with the ScrLock key. And the LED indicates the state...
Hey, very cool! I appreciate you adding this feature!
Let me know if anything isn't 100% In don't have a ScrollLock key on my usual keyboards, and I never turn capsicain off myself. I tested it, but not for a long time.
Any thoughts of making an AHK script to Capsicain converter?
Also, is there a list of Keys, like on the AHK site? Or are all the keynamings the same?
I'm not trying to do anything fancy at all - I just want to remap common WASD FPS shooter key layout to a right-side keyboard layout. I normally use AHK for this, but it seems that some games just completely ignore AHK - Like the new Cyberpunk 2077. AHK does nothing in this game.
Here's my AHK script. It's really, really simple - ScrollLock is my toggle to activate / deactivate mappings: