Skip to content
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

Layout for TKL Keyboard #13

Open
2 tasks done
sandikata opened this issue Dec 23, 2024 · 5 comments
Open
2 tasks done

Layout for TKL Keyboard #13

sandikata opened this issue Dec 23, 2024 · 5 comments

Comments

@sandikata
Copy link

sandikata commented Dec 23, 2024

Is it possible, with current configuration set, to get it working on TKL keyboard?

Expected behavior

Same as in summary.

Current behavior

Screenshot

Possible solutions

Context and reason

Checklist

  • I searched the current issues and the feature is not known.
  • I am mostly sure that the feature will bring more good than harm.
@armync
Copy link
Owner

armync commented Dec 24, 2024

By using that type of keyboard you will lose the fast buybinds functionality. Nevertheless, the config should work just fine :shipit:

I encourage you to make use of second binds script, as you can alternatively swap some used keys with desired guns if necessary. Or, as a last resort, use the F(unction) keys to create a set of pre-built gears; use cs2 bind generator.

@armync
Copy link
Owner

armync commented Dec 24, 2024

Here's an trivial adaptation, made on the run, based on the 04.10.2024 (commit 9e77a91) version. Be wary that it is just a mere example and untested:

// +-+-+-+-+-+-+-+-+-+-+-+-+
// |+|S|e|c|o|n|d|B|i|n|d|s|
// +-+-+-+-+-+-+-+-+-+-+-+-+

// #1 - Primary Binds
alias primaryQ "bind scancode20 +quick-switch"
alias primaryE "bind scancode8 +use-beep"
alias primaryF "bind scancode9 +lookatweapon"
alias primaryC "bind scancode6 radio3"
alias primaryX "bind scancode27 radio2"
alias primaryZ "bind scancode29 radio1"
alias primaryV "-quickinv; bind scancode25 +voicerecord"
alias primaryF1 "bind scancode58"
alias primaryF2 "bind scancode59"
alias primaryF3 "bind scancode60"
alias primaryF5 "bind scancode62 clutch_mode_toggle; select"
alias primaryF6 "bind scancode63 mute-enemy-team"
alias primaryF7 "bind scancode64 ignore-messages"
alias primaryF8 "bind scancode65 ignore-radio"
alias primaryF9 "bind scancode66 fixer"
alias primaryF10 "bind scancode67"
alias primaryF11 "bind scancode68"

// #2 - Secondary Binds
alias secondaryQ "bind scancode20 setQ"
alias secondaryE "bind scancode8 setE"
alias secondaryF "bind scancode9 setF"
alias secondaryC "bind scancode6 setC"
alias secondaryX "bind scancode27 setX"
alias secondaryZ "bind scancode29 setZ"
alias secondaryV "bind scancode25 +quickinv"
alias secondaryF1 "bind scancode58 setF1"
alias secondaryF2 "bind scancode59 setF2"
alias secondaryF3 "bind scancode60 setF3"
alias secondaryF5 "bind scancode62 setF5"
alias secondaryF6 "bind scancode63 setF6"
alias secondaryF7 "bind scancode64 setF7"
alias secondaryF8 "bind scancode65 setF8"
alias secondaryF9 "bind scancode66 setF9"
alias secondaryF10 "bind scancode67 setF10"
alias secondaryF11 "bind scancode68 setF11"

// #3 - Set Binds
alias setQ "slot6"
alias setE "slot7"
alias setF "slot8"
alias setC "slot9; slot10"
alias setX "slot12"
alias setZ "nade-crosshair"
alias setF1 "buy hegrenade; slot3"
alias setF2 "buy flashbang; slot3"
alias setF3 "buy smokegrenade; slot3"
alias setF5 "buy incgrenade; slot3"
alias setF6 "buy vesthelm; buy vest; buy defuser"
alias setF7 "buy p250; slot3"
alias setF8 "buy midtier0; slot3"
alias setF9 "buy midtier1; slot3"
alias setF10 "buy rifle0; slot3"
alias setF11 "buy rifle1; slot3"

// #4 - Toggle Binds
alias +secondbinds "secondaryQ; secondaryE; secondaryF; secondaryC; secondaryX; secondaryZ; secondaryV; secondaryF1; secondaryF2; secondaryF3; secondaryF5; secondaryF6; secondaryF7; secondaryF8; secondaryF9; secondaryF10; secondaryF11"
alias -secondbinds "primaryQ; primaryE; primaryF; primaryC; primaryX; primaryZ; primaryV; primaryF1; primaryF2; primaryF3; primaryF5; primaryF6; primaryF7; primaryF8; primaryF9; primaryF10; primaryF11"

F4 and F12 are not used due to their nature. The default keybind ALT mixed up with F4 will result in a game exit and F12 is used as a shortcut to Steam internal screenshot tooling.

@sandikata
Copy link
Author

I've done some changes. Which works somehow. But there's something else to wish.

// Remove all existing binds.
unbindall

// Updates game keyboard layout to the current Windows keyboard setting.
key_updatelayout

// Send keyboard input directly to the game engine without being processed by the operating system.
// Default: 0
//
// <!> It may have unintended behavior, where the character moves randomly, the bindings are inverted, or even force-enabled.
// <i> If playing on a 3rd party esport platform or experiencing other input bugs, enabling it may mitigate the issues.
// <i> May cause conflicts with the 3rd party clients.
cl_input_enable_raw_keyboard "0"

// Bind keys based on keyboard position instead of key name.
// Default: 1
//
// <i> A scancode is the physical representation of a key on the keyboard, independent of language and keyboard mapping.
input_button_code_is_scan_code_scd "1"

// Slot binds.
bind "scancode30"     "slot1"                                   // [1] Equip: Primary weapon.
bind "scancode31"     "slot2"                                   // [2] Equip: Secondary weapon (pistols).
bind "scancode32"     "slot3"                                   // [3] Equip: Knife, Zeus or Hands (dangerzone).
bind "scancode33"     "slot4"                                   // [4] Equip: Grenades [cycle] (same as 'invnextgrenade').
bind "scancode34"     "slot5"                                   // [5] Equip: C4 Explosive or Medi-Shot.
bind "scancode35"     "slot6"                                   // [6] Equip: High Explosive Grenade or Snowball.
bind "scancode36"     "slot7"                                   // [7] Equip: Flashbang.
bind "scancode37"     "slot8"                                   // [8] Equip: Smoke Grenade.
bind "scancode38"     "slot9"                                   // [9] Equip: Decoy Grenade.
bind "scancode39"     "slot10"                                  // [0] Equip: Incendiary Grenade/Molotov.

// Movement binds.
bind "scancode4"      "+left"                                   // [a] Strafe left.
bind "scancode7"      "+right"                                  // [d] Strafe right.
bind "scancode22"     "+back"                                   // [s] Move back.
bind "scancode26"     "+forward"                                // [w] Move forward.

bind "mouse_x"        "yaw"                                     // Controls the mouse screen movement on vertical axis.
bind "mouse_y"        "pitch"                                   // Controls the mouse screen movement on horizontal axis.

bind "x_axis"         "rightleft"                               // Controls the screen movement on axis X.
bind "y_axis"         "!forwardback"                            // Controls the screen movement on axis Y.
bind "u_axis"         "yaw"                                     // Controls the screen movement on vertical axis.
bind "r_axis"         "pitch"                                   // Controls the screen movement on horizontal axis.


// Chat binds.
bind "scancode24"     "messagemode2"                            // [y] Team messages (chat only with the team).
bind "scancode28"     "messagemode"                             // [u] Broadcast and Team messages (chat with all).

// Radio binds.
bind "scancode6"      "radio3"                                  // [c] Report radio message.
bind "scancode27"     "radio2"                                  // [x] Standard radio message.
bind "scancode29"     "radio1"                                  // [z] Command radio message.
bind "scancode25"     "+voicerecord"                            // [v] Activate the voice communication <hold to speak; only with teammates in matchmaking>.

// Other letter keys.
bind "scancode5"      "buymenu"                                 // [b] Open the buy menu/tablet delivery (dangerzone) to buy weapons, grenades and equipment.
bind "scancode8"      "+use-beep"                               // [e] Execute actions with a beep sound (ex. open doors, pick up weapons, plant bomb etc.) {script}.
bind "scancode9"      "+lookatweapon"                           // [f] Inspect the weapon or lower the tablet (dangerzone).
bind "scancode10"     "drop"                                    // [g] Drop the current weapon.
bind "scancode11"     "+radialradio"                            // [h] Radial radio menu {script}.
bind "scancode12"     "switchhands"                                        // [i] -
bind "scancode13"     "+bomb-drop"                              // [j] Fast bomb drop {script}.
bind "scancode14"     "callvote"                                // [k] Open the vote menu.
bind "scancode15"     "observed-crosshair"                      // [l] Toggle observed player crosshair.
bind "scancode16"     "teammenu"                                // [m] Open the team selection menu and the tablet (dangerzone).
bind "scancode17"     "-attack"                                 // [n] Manual Jump-Throw (used in conjunction with jump).
bind "scancode18"     "toggleradarscale"                        // [o] Toggles the display of alternative radar scale.
bind "scancode19"     "toggle spec_show_xray"                   // [p] Toggles the x-ray during spec.
bind "scancode20"     "+quick-switch"                           // [q] Quick switch the current weapon to knife/zeus and back {script}.
bind "scancode21"     "+reload"                                 // [r] Reload the currently weapon.
bind "scancode23"     "+spray_menu"                             // [t] Open the spray menu to apply spray on the aimed surface.


// Special keys.
bind "scancode41"     "cancelselect"                            // [esc] Open/close the game menu.
bind "scancode43"     "+scores-fps"                             // [tab] Shows the scoreboard or the tablet alongside the fps <hold to show> (dangerzone) {script}.
bind "scancode57"     ""                                        // [capslock] -
bind "scancode225"    "+sprint"                                 // [shift] Walk (slow; no sound).
bind "scancode229"    ""                                        // [rshift]-
bind "scancode224"    "+duck"                                   // [ctrl] Duck/Crouch; press before jumping for a long jump with ExoJump Boots (dangerzone).
bind "scancode228"    ""                                        // [rctrl] -
bind "scancode226"    "+secondbinds"                            // [alt] Toggle the secondary set of keys <hold to activate> {script}.
bind "scancode230"    ""                                        // [ralt] -
bind "scancode44"     "+jump"                                   // [space] Jump <hold for a high jump with ExoJump Boots> (dangerzone) {script}.
bind "scancode40"     ""                                        // [enter] -
bind "scancode42"     ""                                        // [backspace] -
bind "scancode73"     ""                                        // [ins] -
bind "scancode76"     "sellbackall"                             // [del] Refund all the bought items during the round.
bind "scancode74"     ""                                        // [home] -
bind "scancode77"     ""                                        // [end] -
bind "scancode75"     "exec arminc/audio.cfg"                   // [pgup] Execute default audio settings (revert the sound).
bind "scancode78"     "volume 0"                                // [pgdn] Mute the sound.
bind "scancode71"     ""                                        // [sclk] -
bind "scancode72"     ""                                        // [pause] -

// Punctuation keys.
bind "scancode53"     "toggleconsole"                           // [`] Open the developer console.
// bind "scancode54"     "exec autoexec.cfg"                       // [,] Execute the autoexec.cfg.
// bind "scancode55"     "exec config.cfg"                         // [.] Execute the config.cfg.
bind "scancode54"     "buy vesthelm; slot3"                     // [,] Buy: Kevlar Vest + Helmet.
bind "scancode55"     "buy vest; slot3"                         // [.] Buy: Kevlar Vest.
bind "scancode56"     "buy defuser; slot3"                      // [/] Buy: Defuse Kit.
// bind "scancode51"     "noclip"                                  // [;] Toggle the ability to pass through the walls (sv_cheats required).
// bind "scancode52"     "player_ping"                             // ['] Creates a visual pin effect wherever the crosshair is placed (can be used as macro bind).
bind "scancode51"     "buy smokegrenade; slot3"                 // [;] Buy: Smoke Grenade.
bind "scancode52"     "buy flashbang; slot3"                    // ['] Buy: Flashbang.
bind "scancode49"     ""                                        // [\] -
// bind "scancode47"     "debug-hud"                               // ([) Enable visual (hud) debug {script}.
// bind "scancode48"     "debug-console"                           // (]) Output debug informations in console {script}.
bind "scancode47"     "buy hegrenade; slot3"                    // ([) Buy: High Explosive Grenade.
bind "scancode48"     "buy incgrenade; slot3"                   // (]) Buy: Incendiary Grenade/Molotov.
bind "scancode45"     "slot11"                                  // [-] Equip: Zeus.
bind "scancode46"     "slot12"                                  // [backspace] Equip: Medi-Shot.

// Cursor control keys.
bind "scancode82"     "+forward"                                // [uparrow] Move forward.
bind "scancode81"     "+back"                                   // [downarrow] Move back.
bind "scancode80"     "+turnleft"                               // [leftarrow] Rotate to left (counter-clockwise).
bind "scancode79"     "+turnright"                              // [rightarrow] Rotate to right (clockwise).

// Mouse keys.
bind "mwheelup"       "invprev"                                   // Jump at upper scroll.
bind "mwheeldown"     "invnext"                                   // Jump at down scroll.
bind "mouse1"         "+attack"                                 // Shoot, plant, inject medi-shot, cycle forward and do hand jab [fast punch] (dangerzone).
bind "mouse2"         "+attack2"                                // Zoom, toggle silencer/brust, cycle backward and do hand cross [charged punch] (dangerzone).
bind "mouse3"         ""                                        // -
bind "mouse4"         "player_ping"                             // Creates a visual pin effect wherever the crosshair is placed.
bind "mouse5"         "+secondbinds"                            // Toggle the secondary set of keys <hold to activate> {script}.

// Function keys.
bind "scancode58"     "buy rifle0; slot3"                       // [f1] Buy: Rifle 1.
bind "scancode59"     "buy rifle1; slot3"                       // [f2] Buy: Rifle 2.
bind "scancode60"     "buy rifle2; slot3"                       // [f3] Buy: Rifle 3.
bind "scancode61"     "buy secondary1; slot3"                   // [f4] Buy: Pistol 2 (starting from 'Other pistols' category).
bind "scancode62"     "buy secondary2; slot3"                   // [f5] Buy: Pistol 3.
bind "scancode63"     "buy secondary3; slot3"                   // [f6] Buy: Pistol 4.
bind "scancode64"     "afk-move"                                // [f7] Toggle the AFK auto walk in a counter-clockwise circle movement {script}.
bind "scancode65"     "clutch_mode_toggle; select"              // [f8] Toggle the clutch mode (silence the teammates until next round or death) {uses audio effect}.
bind "scancode66"     "mute-enemy-team"                         // [f9] Toggle enemy team communication (disables the enemy chat too) {script}.
bind "scancode67"     "ignore-messages"                         // [f10] Toggle chat messages (disables the messages of - 1: enemy, 2: enemy & team, 3: all) {script}.
bind "scancode68"     "ignore-radio"                            // [f11] Toggle the radio messages {script}.
bind "scancode69"     "fixer"                                   // [f12] Execute the Fixer which may fix graphical glitches, sound glitches, hud bugs etc. {script}.

// Numeric keypad keys.
//
// <> Items aliases:
// Pistols: glock, hkp2000, usp_silencer, elite, p250, tec9, fn57, deagle { (I) CZ75-Auto -> 'tec9', 'fn57'; (II) R8 Revolver -> 'deagle' }
// Rifles: galilar, famas, ak47, m4a1, m4a1_silencer, ssg08, aug, sg556, awp, scar20, g3sg1 { (I) M4A4, M4A1-S, AK-47 -> 'm4a1', 'm4a1_silencer', 'ak47' }
// Heavies: nova, xm1014, mag7, m249, negev { (I) Sawed-Off -> 'mag7' }
// SMGs: mac10, mp9, mp7, ump45, p90, bizon { (I) MP5-SD -> 'mp7' }
// Equipment: vest, vesthelm, taser, defuser, heavyarmor
// Grenades: molotov, incgrenade, decoy, flashbang, hegrenade, smokegrenade, tagrenade
//
// <> Default loadout list (up-bottom order):
// Equipment: vest, vesthelm, taser, defuser
// Pistols: hpk2000/usp_silencer/glock, elite, p250, fn57/tec9, deagle
// Mid-Tier: nova, xm1041, mp5sd, p90, mp9/mac10
// Rifles: famag/galilar, m4a1/m4a1_silencer/ak47, ssg08, aug/sg556, awp
// Grenades: flashbang, smokegrenade, hegrenade, incgrenade, decoy
//
// <i> An item which has a different name in the other team, can be bought via the other team-side alias.
// <i> After buying the items, the knife will be automatically equipped for an easier spawn run.
// bind "scancode83"     ""                                        // [numlock] -
// bind "scancode84"     "buy hegrenade; slot3"                    // [/] Buy: High Explosive Grenade.
// bind "scancode85"     "buy flashbang; slot3"                    // [*] Buy: Flashbang.
// bind "scancode86"     "buy smokegrenade; slot3"                 // [-] Buy: Smoke Grenade.
// bind "scancode87"     "buy incgrenade; slot3"                   // [+] Buy: Incendiary Grenade/Molotov.
// bind "scancode88"     "buy defuser; slot3"                      // [enter] Buy: Defuse Kit.
// bind "scancode99"     "buy vest; slot3"                         // [.] Buy: Kevlar Vest.
// bind "scancode98"     "buy vesthelm; slot3"                     // [0] Buy: Kevlar Vest + Helmet.
// bind "scancode89"     "buy secondary1; slot3"                   // [1] Buy: Pistol 2 (starting from 'Other pistols' category).
// bind "scancode90"     "buy secondary2; slot3"                   // [2] Buy: Pistol 3.
// bind "scancode91"     "buy secondary3; slot3"                   // [3] Buy: Pistol 4.
// bind "scancode92"     "buy midtier0; slot3"                     // [4] Buy: Mid-Tier 1.
// bind "scancode93"     "buy midtier1; slot3"                     // [5] Buy: Mid-Tier 2.
// bind "scancode94"     "buy midtier2; slot3"                     // [6] Buy: Mid-Tier 3.
// bind "scancode95"     "buy rifle0; slot3"                       // [7] Buy: Rifle 1.
// bind "scancode96"     "buy rifle1; slot3"                       // [8] Buy: Rifle 2.
// bind "scancode97"     "buy rifle2; slot3"                       // [9] Buy: Rifle 3.

// Radial radio.
cl_radial_radio_tab_0_text_1 "#Chatwheel_midplan"              // Ping middle.
cl_radial_radio_tab_0_text_2 "#Chatwheel_bplan"                // Ping site B.
cl_radial_radio_tab_0_text_3 "#Chatwheel_oneenemyhere"         // Ping 'one enemy' spoted.
cl_radial_radio_tab_0_text_4 "#Chatwheel_requestplan"          // Ask the game plan.
cl_radial_radio_tab_0_text_5 "#Chatwheel_requestweapon"        // Request weapon.
cl_radial_radio_tab_0_text_6 "#Chatwheel_rotatetome"           // Call the teammates rotation.
cl_radial_radio_tab_0_text_7 "#Chatwheel_heardnoise"           // Call a noise.
cl_radial_radio_tab_0_text_8 "#Chatwheel_aplan"                // Ping site A.

// Prevent buy wheel from purchasing via number keys.
// Default: 0
cl_buywheel_nonumberpurchasing "0"

// Zoom button hold.
// Default: 1
//
// >> Holding the zoom button should heave as if it was pressed repetedly.
//
// <> Values:
// 0: Repetitive zoom.
// 1: One click.
cl_debounce_zoom "0"

// Detach silencer on supported weapons.
// Default: 0
//
// >> Removal of silencers on the M4A1-S and USP-S.
//
// <> Values:
// 0: Cannot detach.
// 1: Press secondary fire to detach.
cl_silencer_mode "1"

// Pressing the +use key will open the buy menu if in a buy zone (just as if the 'buy' key is pressed).
// Default: 1
cl_use_opens_buy_menu "0"

// The type of binding which enables mouse selection in the scoreboard.
// Default: +attack2
cl_scoreboard_mouse_enable_binding "+attack2"

// Set the key to use for donation in the buy menu.
// Default: 0
//
// <> Values:
// 0: Left Control.
// 1: Left Alt.
// 2: Left Shift.
cl_buywheel_donate_key "0"

// Duck toggle.
// Default: 0
//
// <> Values:
// 0: Hold to duck.
// 1: Press to toggle duck.
option_duck_method "0"

// Walk toggle.
// Default: 0
//
// <> Values:
// 0: Hold to walk.
// 1: Press to toggle walk.
option_speed_method "0"

// Auto-deploy parachute if fall speed exceeds lethal limit.
// Default: 1
cl_parachute_autodeploy "1"

// When tapping the radial radio button, leave a ping if nothing is selected within the time in seconds set in 'cl_radial_menu_tap_duration'.
// Default: 1
cl_radial_radio_tap_to_ping "1"

// Joystick game engine controller support.
// Default: 0
joystick "0"

// Joystick input recognition within the game.
// Default: 0
cl_joystick_enabled "0"

@sandikata
Copy link
Author

What about your example? How it supposed to work? Or it is with modifier key (Alt) ?

@armync
Copy link
Owner

armync commented Dec 25, 2024

Your bindings are a way of doing it, yeah. My idea was using the modifier key (Alt). You are supposed to use it at the beginning of the round, by pressing ALT + desired F1-F11 (except F4 and F12) key for whatever item needed. Sadly there is no way in a TKL layout to embrace all the items in a perfect way (our workarounds a bit slower or... randomly placed binds across the keyboard rather than grouped in the same area).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants