Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: waste2 on August 19, 2011, 07:57:17 AM

Title: How to disable keyboard shortcuts when writing a message
Post by: waste2 on August 19, 2011, 07:57:17 AM
Hello. I got an issue with keyboard shortcuts when writing a message (shortcuts: hit shift+alt+s to submit/post or shift+alt+p to preview). Some of my users who use Mac can't use polish national character "ś" because browser recognizes it as [shift+alt+s] and send the message. Is there any way to disable it, or change maybe?
Title: Re: How to disable keyboard shortcuts when writing a message
Post by: kat on August 19, 2011, 08:37:59 AM
I could be wrong, here. But, I don't think SMF, itself, creates those shortcuts.

I believe the OS, itself, creates them.

So, you'd need to figure-out how disable them from the OS, not SMF.

As I said, though, I could be wrong... ;)

http://msdn.microsoft.com/en-us/library/aa460734.aspx

Title: Re: How to disable keyboard shortcuts when writing a message
Post by: Illori on August 19, 2011, 08:53:30 AM
"shortcuts: hit alt+s to submit/post or alt+p to preview" is shown below the full post window these are smf shortcuts not browser. you would need to search the code for that and remove it, i think it may be in the js files.

looks to be in several source files [search for shortcuts] and in editor.js
Title: Re: How to disable keyboard shortcuts when writing a message
Post by: waste2 on August 19, 2011, 08:58:08 AM
Answer to K@:
I wouldn't be so sure about that. Windows or MacOS can't make your browser to send a form via POST request just by itself. Besides, here's lines from SMF language files:

$txt['shortcuts'] = 'shortcuts: hit alt+s to submit/post or alt+p to preview';
$txt['shortcuts_firefox'] = 'shortcuts: hit shift+alt+s to submit/post or shift+alt+p to preview';


Ofc, that proves nothing, but still I am quite sure it is SMF functionality.
Title: Re: How to disable keyboard shortcuts when writing a message
Post by: Illori on August 19, 2011, 08:59:56 AM
it is according to my post above if you read it at all.
Title: Re: How to disable keyboard shortcuts when writing a message
Post by: waste2 on August 19, 2011, 09:06:04 AM
No Illori, it's not for you. Your post showed up when I was writing my message. I will check JS files, but first I wanted to know is there any build-in option to disable this shortcuts.
Title: Re: How to disable keyboard shortcuts when writing a message
Post by: kat on August 19, 2011, 01:52:10 PM
Told you I might be wrong. ;)
Title: Re: How to disable keyboard shortcuts when writing a message
Post by: Sir Osis of Liver on August 19, 2011, 02:45:41 PM

They're redundant - just edit them out of the code.
Title: Re: How to disable keyboard shortcuts when writing a message
Post by: waste2 on August 22, 2011, 03:41:26 AM
OK, so I guess there is no option to disable it, only to edit code. To be honest this shortcuts are useless anyway, no one uses it on my forum.
How can I make suggestion for the next version, to provide an option in user profile to disable this?
Title: Re: How to disable keyboard shortcuts when writing a message
Post by: Illori on August 22, 2011, 05:50:55 AM
post in the feature requests board.
Title: Re: How to disable keyboard shortcuts when writing a message
Post by: Dwev on November 15, 2017, 06:40:06 PM
In case someone else is looking for the solution to this problem: to get rid of this shortcuts text you'll have to remove the phrase "shortcuts: hit alt+s to submit/post or alt+p to preview" from the files "index.english.php" and "Post.english.php".

Both of these files can be found in Themes > default > languages.

Might save someone else the time I spent looking for it...   ;)
Title: Re: How to disable keyboard shortcuts when writing a message
Post by: Kindred on November 15, 2017, 09:42:54 PM
That may remove the text, but it does not remove the shortcut code itself
Title: Re: How to disable keyboard shortcuts when writing a message
Post by: Steve on November 16, 2017, 09:43:56 AM
As the original post has been asked and answered, marking solved.