Menu

#2465 Engine selection hotkeys flaky

None
New
nobody
None
Low
2020-12-15
2020-12-14
No

I have implemented engine selection messages in my aircraft like

var EngineSelectMessage = func() {
 var select = [0, 0, 0, 0, 0];
 var nSel = 0;
 var names = ["1", "2", "3", "4", "APU"];
 var list = "";
 for(var ii = 0; ii < 5; ii += 1){
  select[ii] = getprop("sim/input/selected/engine[" ~ ii ~ "]");
  if(select[ii]) {
   if(nSel) {
    list ~= ", ";
   }
   list = list ~ names[ii];
   nSel += 1;
  }
 }
 if(nSel == 5) {
  list = "all"
 }else if(nSel == 0) {
  list = "none"
 }
 screen.log.write("(engineer): Engine selection: " ~ list ~ ".");
}

setlistener("sim/input/selected/engine[0]", func(p) {
 settimer(func {
  EngineSelectMessage();
 }, 0.01);
});

and then the thing I've been feeling for a long while was confirmed: sometimes engine selection key will not work the first time, and you have to press it 1-2 more times. Especially often it happens to ! and $ (engine 1 and 4).

Discussion

  • Anonymous

    Anonymous - 2020-12-14

    I think it has something to do with <mod-shift> on key 1 fighting with key !?

     
  • James Turner

    James Turner - 2020-12-15

    Yeah, mod-shift binding on a non-alphabetical key seems destined to cause problems to me. That doesn;t explain why it's erratic however.

     

Log in to post a comment.

MongoDB Logo MongoDB