Comments (4)
Something like this could possibly be done using CBA_fnc_getKeybind:
_entry = ["RQ-11B Raven Addon", "Altitude Raise"] call CBA_fnc_getKeybind;
if (!isNil "_entry") then {
_keyBind = _entry select 5; // [17, [false, false, false]]
_dikCode = _keystroke select 0 // 17
_keyStr = cba_keybinding_dikDecToStringTable select (_dikCode + 1) // ["17", "W"]
...
...
};
FEINT_fnc_revealKeybind = {
private "_entry";
_entry = _this call CBA_fnc_getKeybind;
if (isNil "_entry") then { nil } else { _entry select 5 };
};
from cba_a3.
@jaynus
Checking status on this.
How does killswitch's response work for you?
from cba_a3.
It's "feint" who had the issue and jaynus copied it here from the one at Dev-Heaven
With no feedback from feint here or at DH, we have no idea of the status. Hopefully, feint has been able to implement a "reveal keybind" function with the tips I provided.
from cba_a3.
Hey, this is Feint (Feint username is taken). Sorry for the delay in my feedback. This is working great for me. I set up the following code to display the key in my Raven 3.0 addon that's coming out soon.
findCBAKeyAssignments = {
private ["_addonToSearchFor","_keyToSearchFor","_keyConfig","_prettyKeyName","_shiftState","_ctrlState","_altState","_assignedKey","_keyResults"];
_addonToSearchFor = _this select 0;
_keyToSearchFor = _this select 1;
_keyConfig = [_addonToSearchFor,_keyToSearchFor] call cba_fnc_getKeybind;
_prettyKeyName = _keyConfig select 2;
_shiftState = _keyConfig select 5 select 1 select 0;
_ctrlState = _keyConfig select 5 select 1 select 1;
_altState = _keyConfig select 5 select 1 select 2;
_assignedKey = keyName (_keyConfig select 5 select 0);
if (_shiftState) then {_shiftState = "Shift"} else {_shiftState = ""};
if (_ctrlState) then {_ctrlState = "Ctrl"} else {_ctrlState = ""};
if (_altState) then {_altState = "Alt"} else {_altState = ""};
_keyResults = [_prettyKeyName,_shiftState,_ctrlState,_altState,_assignedKey];
_keyResults
};
Example:
_testResults = ["RQ-11B Raven Addon","Altitude_Raise"] call MAV_fnc_findCBAKeyAssignments;
_instructions = format ["%1 = %2%3%4 %5",_testResults select 0,_testResults select 1,_testResults select 2,_testResults select 3,_testResults select 4];
(_dspl displayCtrl 2020667) ctrlSetStructuredText parseText _instructions;
Result:
"Altitude Raise" = "W"
Thanks for adding this to your fine code. It really helps.
from cba_a3.
Related Issues (20)
- [Feature Request]: Add an extra parameter to CBA_fnc_execNextFrame for settable frame delay
- cba
- PerFrameHandler Framework Issue: Stuck Handler Prevents Execution of Subsequent Handlers HOT 8
- CBA_fnc_compatibleItems Error HOT 6
- Frame related functions dont work in Eden Editor
- Latest CBA version does not honor white space in the CBA settings Configuration File for Task Force Arrowhead Radio (BETA) HOT 2
- Some CBA Settings fail to import HOT 5
- Old armaholic link HOT 1
- Camera not working in Keyframe animation HOT 5
- Toggling 2D and 3D on optics doesn't consistently work unless you hit both applicable keybinds at once. HOT 5
- Third Person View HOT 1
- Vehicle Parameter in GetIn Extended Eventhandler has wrong value HOT 2
- 3.16.1.231025 Bugs in /settings/fnc_parse.sqf and /common/fnc_addPlayerAction.sqf HOT 2
- Zeus not working. Zeus Game Master and Spawn AI modules, when placed in Eden Editor, don't work in Single Player HOT 1
- Problem when running arma with cba Addon "cba_ jam _spe" requires addon "WW2_spe_core_c_zzz_lastloaded_c" HOT 6
- My friend cannot connect to a server because Arma 3 says CBA is not detected even though it is installed HOT 8
- the addon config not working HOT 3
- Server doesn't read cba_settings.sqf file in userconfig HOT 4
- CBA_fnc_compatibleItems throws undefined variable errors when called with a single parameter HOT 1
- Модуль HC
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cba_a3.