Disable keyboard shortcuts

P

Pegasus

I use some keyboard shortcuts that are global to Windows,
e.g. Ctrl+; to generate the letter "ö". This does not work in
Excel because Ctrl+; inserts the current date. Is there a
way to disable such inbuilt shortcuts in Excel 2003, either
individually or the whole lot?
 
P

Peo Sjoblom

If you are looking for an umlaut o like they are using in Sweden and Germany
then you can use Alt + 148 for small letter, Alt + 153 for large
for the other 2 Swedish letters you can use Alt + 132 and Alt + 134 for
small
and for large Alt + 142 and Alt + 143

(it's important to use the numpad keys for the numbers)
 
P

Pegasus

Yes, I'm aware of this entry mode. Since it is a very cumbersone
way of getting these letters on a laptop keyboard (where there is
no numeric keypad!), I prefer to reprogram the keyboard itself,
which works very nicely in all applications except in Excel.

Do you know how to disable shortcuts in Excel?
 
P

Peo Sjoblom

Why don't you just record a macro to your personal.xls when you do this and
then assign the macros to keyboard shortcuts or menu icons

ActiveCell.FormulaR1C1 = "ö"

will insert the ö
 
P

Pegasus

Good idea. I'll do this unless someone can tell me how to
disable the inbuilt shortcuts.
 
P

Pegasus \(MVP\)

Drats. Macros can only be assigned to Ctrl+letter, not to
Ctrl+;. Any other suggestions?
 
D

Dave Peterson

You can use code to assign a non-letter:

Option Explicit
Sub Auto_Open()
Application.OnKey "^;", "'" & ThisWorkbook.Name & "'!myMac"
End Sub
Sub Auto_Close()
Application.OnKey "^;"
End Sub
Sub mymac()
Selection.Value = "ö"
End Sub
 
S

Stan Brown

If you are looking for an umlaut o like they are using in Sweden and Germany
then you can use Alt + 148 for small letter, Alt + 153 for large
for the other 2 Swedish letters you can use Alt + 132 and Alt + 134 for
small and for large Alt + 142 and Alt + 143

The OEM characters that you suggest are discouraged because they will
not necessarily appear the same on all Windows systems or in all
fonts.

Much, much better is to use the four-digit sequences, which will
appear correctly in a greater range of circumstances:

Alt-0214 Ö
Alt-0246 ö
Alt-0196 Ä
Alt-0228 ä
Alt-0216 Ø
Alt-0248 ø
Alt-0196 Æ
Alt-0230 æ
Alt-0197 Å
Alt-0229 å
 
P

Peo Sjoblom

Stan Brown said:
The OEM characters that you suggest are discouraged because they will
not necessarily appear the same on all Windows systems or in all
fonts.


Care to share which versions of windows it doesn't work with regards to the
above mentioned characters?


--


Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
(Remove ^^ from email)
 
P

Pegasus \(MVP\)

Thanks for your reply.

I tried your suggestion and it almost works - but not quite!
When I press "Ctrl+;" the first time then I get "ö" but when
I press it a second time then I get nothing. Even worse:
When I try to enter the word "söndag" then I get "s27/06/2007".
Any other options or do I have to commit this one to the
too-hard-basket?
 
P

Pegasus \(MVP\)

Stan Brown said:
http://www.autohotkey.com

The cost is zero, and it works extremely well across applications.

Very nice tool, worth adding to my tool kit. Unfortunately it does
not quite work in Excel. When I press Ctrl+; it generates the letter
"Ö" as expected but when I press Ctrl+; again it generates 27/06/2007.
It appears that the inbuilt Excel macro reasserts itself at this stage.
It's a pity - I really like this tool!
 
P

Pegasus \(MVP\)

Stan Brown said:
The OEM characters that you suggest are discouraged because they will
not necessarily appear the same on all Windows systems or in all
fonts.

Much, much better is to use the four-digit sequences, which will
appear correctly in a greater range of circumstances:

Alt-0214 Ö
Alt-0246 ö
Alt-0196 Ä
Alt-0228 ä
Alt-0216 Ø
Alt-0248 ø
Alt-0196 Æ
Alt-0230 æ
Alt-0197 Å
Alt-0229 å

I currently use a redesigned keyboard map as explained
here: http://www.microsoft.com/globaldev/tools/msklc.mspx.
In essence this means that I am rolling my own keyboard and
make it native to Windows - I even generate my own .DLL.
It's the official MS keyboard remapper and it works across
all Windows applications.

I am fully aware of the numeric codes you quote. They are
not really an option: They are clumsy at the best of times
and become painful on a laptop with no numeric keypad.
Pressing nine keys to get one character is a bit much!
(Shift,NumLock,Alt,0,2,2,9,Shift,NumLock)
 
D

Dave Peterson

If you're trying to run this macro while you're editing the cell, you're out of
luck. Macros in excel won't work this way.
 
P

Pegasus \(MVP\)

Intriguing. Excel macros won't work while I'm editing a cell
but the inbuilt keyboard shortcuts do. That's why I was
hoping that someone would know a way to turn them off!
 
D

Dave Peterson

I don't think I've ever seen a post where someone could get into the innards of
excel and change its behavior like you want.

I know that it's impossible for me to do <bg>.

Pegasus (MVP) said:
Intriguing. Excel macros won't work while I'm editing a cell
but the inbuilt keyboard shortcuts do. That's why I was
hoping that someone would know a way to turn them off!
 
P

Pegasus \(MVP\)

Thanks. I think I will now put the question directly to Microsoft
under the MVP plan. Keep an eye on this thread in case you're
interested.
 
P

Peo Sjoblom

What kind of plan is that and what kind of MVP are you?

--
Regards,

Peo Sjoblom



Pegasus (MVP) said:
Thanks. I think I will now put the question directly to Microsoft
under the MVP plan. Keep an eye on this thread in case you're
interested.
 
S

Stan Brown

Very nice tool, worth adding to my tool kit. Unfortunately it does
not quite work in Excel. When I press Ctrl+; it generates the letter
"Ö" as expected but when I press Ctrl+; again it generates 27/06/2007.
It appears that the inbuilt Excel macro reasserts itself at this stage.
It's a pity - I really like this tool!

What does your .AHK file ook like?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top