Shift + 1/2/3

smoochy boys on tour

deano13

StopMeFast
Golden Oldie
Oct 31, 2004
2,425
176
170
London, England
Mainly aimed at melee I guess but has anyone managed to solve the holding shift + pressing 1 thingy? As it stands if you hold shift and press 1/2/3 to say pot (whilst in PvP as a war when your close to target) it brings up the chat bar and ! instead of potting, now I know Artificial solved this issue on there server (thank you guys for that great experiance) but every other server hasn’t, I’ve pissed about with the Ingame keybinds even changing it so when pressing shift + 1/2/3 etc it should pot but it doesn’t work -.- so was wondering if there’s a work around out there that someone has come up with and if so please share it with me 😁
 

Far

tsniffer
Staff member
Developer
May 19, 2003
20,178
30
2,780
540
It's already built in to the key bind dialog, you just need to change the key bind to "strict" mode.

When its not strict the key bind you set for pressing 1 also allows Ctrl + 1, or Alt + 1 or Shift + 1. When in strict mode and you set it then it'll only work when only 1 is pressed.

Looking at the existing keybind.ini the belt is already setup correctly so you only pot when 1 is pressed on its own. If you don't want it like this, then just untick "strict" mode and set the keybind again.

[Belt1]
RequireAlt=0
RequireShift=0
RequireTilde=0
RequireCtrl=0
RequireKey=D1

Also, please post in the correct section - this belongs in Cystal Help, not Mir 2 Chat.
 
  • Like
Reactions: deano13

Chriz

Captain Lurker
VIP
Mar 24, 2003
1,158
277
335
LOMCN
It's already built in to the key bind dialog, you just need to change the key bind to "strict" mode.

When its not strict the key bind you set for pressing 1 also allows Ctrl + 1, or Alt + 1 or Shift + 1. When in strict mode and you set it then it'll only work when only 1 is pressed.

Looking at the existing keybind.ini the belt is already setup correctly so you only pot when 1 is pressed on its own. If you don't want it like this, then just untick "strict" mode and set the keybind again.

[Belt1]
RequireAlt=0
RequireShift=0
RequireTilde=0
RequireCtrl=0
RequireKey=D1

Also, please post in the correct section - this belongs in Cystal Help, not Mir 2 Chat.
Pretty sure its not that simple.. i'm sure is/was custom logic around handling chat input when a user presses keys like ! (shift and 1 on UK keyboard)

1611922289982.png
 

Far

tsniffer
Staff member
Developer
May 19, 2003
20,178
30
2,780
540
The normal request is usually that people DON'T want the belt slot to be used when you're holding SHIFT. As previously if you pressed SHIFT + 1 to type "!" it would use bag slot 1. This was requested many times and so the default was changed so if you pressed SHIFT + 1 it wouldn't trigger the belt slot 1, and instead you could only press "1" on its own to trigger the belt. This sounds like correct logic to me.

If Deano wants the opposite, and wants the belt to trigger when either "1" on its own is pressed, or Shift + 1 is pressed - then the keybind can be changed in to relax mode, but yes it will likely also trigger the chat panel.

That sounds like strange logic though, how would you differentiate between knowing that you need to use your belt slot, and you needed to press "!". Only thing i can think of would be remove the feature of auto enabling the chat box and only allow it when you've already pressed enter to focus it. Which i expect would also annoy people who don't want to use it that way.


You code snippet is identical to the public source btw, unless you've got logic elsewhere that will focus and type in the chat box when shift + 1 is pressed.
 
  • Like
Reactions: deano13

Tai

HEAD CAPTAIN
Staff member
Administrator
May 11, 2003
14,303
2
2,686
515
United Kingdom
I think having to press enter first is probably preferable to most people rather than having the chat box activate when you're potting it pvp and ending up with a string of 111111111113333331116dead

We've all been there
 

Chriz

Captain Lurker
VIP
Mar 24, 2003
1,158
277
335
LOMCN
You code snippet is identical to the public source btw, unless you've got logic elsewhere that will focus and type in the chat box when shift + 1 is pressed.

That is the default code in your repo, however in our code - we disabled that line:

1611931375851.png


Its probably more preferable to perhaps add a toggle to the MirConfig.Ini to give people the choice. (that's one thing on my list to do anyway!)

People definitely have different preferences on this though.

Or even if only the right shift key triggered it and the left one didn't..?
 
  • Like
Reactions: Far

Sanjian

Just a Mir2 Fan
VIP
Apr 28, 2011
3,957
5
2,074
350
East Sussex
i used a setting for the options page

Code:
        private void ChatPanel_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (Settings.KeyModifiers)
            {
                switch (e.KeyChar)
                {
                    case '@':
                    case '!':
                    case ' ':
                    case (char)Keys.Enter:
                        ChatTextBox.SetFocus();
                        if (e.KeyChar == '!') ChatTextBox.Text = "!";
                        if (e.KeyChar == '@') ChatTextBox.Text = "@";
                        if (ChatPrefix != "") ChatTextBox.Text = ChatPrefix;

                        ChatTextBox.Visible = true;
                        ChatTextBox.TextBox.SelectionLength = 0;
                        ChatTextBox.TextBox.SelectionStart = ChatTextBox.Text.Length;
                        e.Handled = true;
                        break;
                    case '/':
                        ChatTextBox.SetFocus();
                        ChatTextBox.Text = LastPM + " ";
                        ChatTextBox.Visible = true;
                        ChatTextBox.TextBox.SelectionLength = 0;
                        ChatTextBox.TextBox.SelectionStart = ChatTextBox.Text.Length;
                        e.Handled = true;
                        break;
                }
            }
            else
            {
                switch (e.KeyChar)
                {
                    case (char)Keys.Enter:
                        ChatTextBox.SetFocus();
                        if (e.KeyChar == '!') ChatTextBox.Text = "!";
                        if (e.KeyChar == '@') ChatTextBox.Text = "@";
                        if (ChatPrefix != "") ChatTextBox.Text = ChatPrefix;

                        ChatTextBox.Visible = true;
                        ChatTextBox.TextBox.SelectionLength = 0;
                        ChatTextBox.TextBox.SelectionStart = ChatTextBox.Text.Length;
                        e.Handled = true;
                        break;
                    case '/':
                        ChatTextBox.SetFocus();
                        ChatTextBox.Text = LastPM + " ";
                        ChatTextBox.Visible = true;
                        ChatTextBox.TextBox.SelectionLength = 0;
                        ChatTextBox.TextBox.SelectionStart = ChatTextBox.Text.Length;
                        e.Handled = true;
                        break;
                }
            }
        }

1611932610635.png
 
  • Like
Reactions: deano13

deano13

StopMeFast
Golden Oldie
Oct 31, 2004
2,425
176
170
London, England
i used a setting for the options page

Code:
        private void ChatPanel_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (Settings.KeyModifiers)
            {
                switch (e.KeyChar)
                {
                    case '@':
                    case '!':
                    case ' ':
                    case (char)Keys.Enter:
                        ChatTextBox.SetFocus();
                        if (e.KeyChar == '!') ChatTextBox.Text = "!";
                        if (e.KeyChar == '@') ChatTextBox.Text = "@";
                        if (ChatPrefix != "") ChatTextBox.Text = ChatPrefix;

                        ChatTextBox.Visible = true;
                        ChatTextBox.TextBox.SelectionLength = 0;
                        ChatTextBox.TextBox.SelectionStart = ChatTextBox.Text.Length;
                        e.Handled = true;
                        break;
                    case '/':
                        ChatTextBox.SetFocus();
                        ChatTextBox.Text = LastPM + " ";
                        ChatTextBox.Visible = true;
                        ChatTextBox.TextBox.SelectionLength = 0;
                        ChatTextBox.TextBox.SelectionStart = ChatTextBox.Text.Length;
                        e.Handled = true;
                        break;
                }
            }
            else
            {
                switch (e.KeyChar)
                {
                    case (char)Keys.Enter:
                        ChatTextBox.SetFocus();
                        if (e.KeyChar == '!') ChatTextBox.Text = "!";
                        if (e.KeyChar == '@') ChatTextBox.Text = "@";
                        if (ChatPrefix != "") ChatTextBox.Text = ChatPrefix;

                        ChatTextBox.Visible = true;
                        ChatTextBox.TextBox.SelectionLength = 0;
                        ChatTextBox.TextBox.SelectionStart = ChatTextBox.Text.Length;
                        e.Handled = true;
                        break;
                    case '/':
                        ChatTextBox.SetFocus();
                        ChatTextBox.Text = LastPM + " ";
                        ChatTextBox.Visible = true;
                        ChatTextBox.TextBox.SelectionLength = 0;
                        ChatTextBox.TextBox.SelectionStart = ChatTextBox.Text.Length;
                        e.Handled = true;
                        break;
                }
            }
        }

View attachment 24798

ahhh I do apologise, credit where credits due your server also had this option 👍🏻.
Post automatically merged:

I think having to press enter first is probably preferable to most people rather than having the chat box activate when you're potting it pvp and ending up with a string of 111111111113333331116dead

We've all been there

exactly that reason lol!
Post automatically merged:

It's already built in to the key bind dialog, you just need to change the key bind to "strict" mode.

When its not strict the key bind you set for pressing 1 also allows Ctrl + 1, or Alt + 1 or Shift + 1. When in strict mode and you set it then it'll only work when only 1 is pressed.

Looking at the existing keybind.ini the belt is already setup correctly so you only pot when 1 is pressed on its own. If you don't want it like this, then just untick "strict" mode and set the keybind again.

[Belt1]
RequireAlt=0
RequireShift=0
RequireTilde=0
RequireCtrl=0
RequireKey=D1

Also, please post in the correct section - this belongs in Cystal Help, not Mir 2 Chat.

So where do I find this strict mode so the belt triggers when holding shift 😬
 
Last edited:

Far

tsniffer
Staff member
Developer
May 19, 2003
20,178
30
2,780
540
It's the only tick box at the bottom which says strict mode

Sent from my SM-G930F using Tapatalk
 
  • Like
Reactions: deano13

Far

tsniffer
Staff member
Developer
May 19, 2003
20,178
30
2,780
540
If they have the dialog they'll have that option - its been built in from day 1 of me adding it.

If they don't have the dialog just change the keybind.ini manually.

This is strict mode

[Belt1]
RequireAlt=0
RequireShift=0
RequireTilde=0
RequireCtrl=0
RequireKey=D1

this is relaxed mode

[Belt1]
RequireAlt=2
RequireShift=2
RequireTilde=2
RequireCtrl=2
RequireKey=D1
 
  • Like
Reactions: Netskee and deano13

deano13

StopMeFast
Golden Oldie
Oct 31, 2004
2,425
176
170
London, England
If they have the dialog they'll have that option - its been built in from day 1 of me adding it.

If they don't have the dialog just change the keybind.ini manually.

This is strict mode

[Belt1]
RequireAlt=0
RequireShift=0
RequireTilde=0
RequireCtrl=0
RequireKey=D1

this is relaxed mode

[Belt1]
RequireAlt=2
RequireShift=2
RequireTilde=2
RequireCtrl=2
RequireKey=D1

this before logging in and running the patcher or after logging in?
 

Far

tsniffer
Staff member
Developer
May 19, 2003
20,178
30
2,780
540
you can only change the ini files when you don't have the client running.
 
  • Like
Reactions: deano13

Far

tsniffer
Staff member
Developer
May 19, 2003
20,178
30
2,780
540
It's not meant to.

You set it to relaxed mode, then update the key binds you want to change - and they'll now all be set to relaxed until you rebind them.
 

deano13

StopMeFast
Golden Oldie
Oct 31, 2004
2,425
176
170
London, England
It's not meant to.

You set it to relaxed mode, then update the key binds you want to change - and they'll now all be set to relaxed until you rebind them.

Maybe it’s just this server 🤷🏻‍♂️ But it definitely doesn’t stick and the keybinds don’t work, so it’s back to 1111!!!!!!1111!!!!! 😔