Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Remap key doesn't work in MS OneNote


  • Please log in to reply
6 replies to this topic
BM
  • Guests
  • Last active:
  • Joined: --
If I remap keys using below script to use CapsLock+i to move up etc. it works perfectly well in Wordpad, Outlook, Excel but NOT in OneNote.
Left and Right movement works in OneNote but not Up and Down (with CapLock+i and Capslock+k). I run it on Vista-64.

Is this a bug?

THANKS for any suggestions!

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

SetCapsLockState, AlwaysOff

CapsLock & i::
       if getkeystate("alt") = 0
               Send,{Up}
       else
               Send,+{Up}
return

CapsLock & l::
       if getkeystate("alt") = 0
               Send,{Right}
       else
               Send,+{Right}
return

CapsLock & j::
       if getkeystate("alt") = 0
               Send,{Left}
       else
               Send,+{Left}
return

CapsLock & k::
       if getkeystate("alt") = 0
               Send,{Down}
       else
               Send,+{Down}
return


Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
In case you haven't found a solution, you could try using SendPlay, or set the script to have administrator access:

On Windows Vista, some scripts might require administrator privileges to function properly (such as a script that interacts with a process or window that is run as administrator). To achieve this, add the following at the top of the script (this would need to be enhanced to work for compiled scripts and/or to pass parameters):
if not A_IsAdmin
{
   DllCall("shell32\ShellExecuteA", uint, 0, str, "RunAs", str, A_AhkPath
      , str, """" . A_ScriptFullPath . """", str, A_WorkingDir, int, 1)
   ExitApp
}


Ecue
  • Members
  • 2 posts
  • Last active: Oct 12 2009 10:53 PM
  • Joined: 12 Oct 2009
You have to use SendPlay {UP} for OneNote for some reason.
Since SendPlay is not compatible with UAE, you must disable UAE though.

try
  • Members
  • 1 posts
  • Last active: Oct 25 2009 01:23 AM
  • Joined: 25 Oct 2009
This is a really annoying bug - especially for people like me, who don't have admin access at work. Who should I bug to please get this fixed?

Ecue
  • Members
  • 2 posts
  • Last active: Oct 12 2009 10:53 PM
  • Joined: 12 Oct 2009
<!-- m -->http://blogs.msdn.co... ... ror-5.aspx<!-- m -->

The instruction on this page works.

You need an administrator priviledge anyway.

adastra
  • Guests
  • Last active:
  • Joined: --
I was struggling with the same problem for quite some time.
On Windows 7, SendPlay seems to work with OneNote.

That's the script I use:

SetCapsLockState, AlwaysOff

;###########################################
; Use Capslock for Navigation
; Drawback: Couldn't get the CapsLock+Shift+Key combo to work
;###########################################

;Does not work in OneNote
;Capslock & k::Send {Down}
;Capslock & i::Send {Up}


Capslock & j::SendPlay {Left}
Capslock & l::SendPlay {Right}
Capslock & k::SendPlay {Down}
Capslock & i::SendPlay {Up}


Capslock & u::SendPlay {Home}
Capslock & o::SendPlay {End}

Capslock & h::SendPlay {PgUp}
Capslock & n::SendPlay {PgDn}


Capslock & x::SendPlay {Del}
Capslock & z::SendPlay ^{z}
Capslock & y::SendPlay ^{y}
Capslock & c::SendPlay ^{c}
Capslock & v::SendPlay ^{v}
Capslock & s::SendPlay ^{s}
Capslock & a::SendPlay ^{a}
Capslock & w::SendPlay ^{w}
Capslock & e::SendPlay ^{e}
Capslock & q::SendPlay ^{q}

Capslock & Tab::SendPlay ^{Tab}

Capslock & NumpadSub::SendPlay {Volume_Down}
Capslock & NumpadAdd::SendPlay {Volume_Up}
Capslock & NumpadMult::SendPlay {Volume_Mute}



;########################################
; Use Control for Navigation
; Drawback 1: Overwrites Control+CursorKeys combo for word skipping
; Drawback 1: Ctrl+n is used for new folders etc.
;#########################################

^j::SendPlay ^{Left}
^k::SendPlay ^{Down}
^l::SendPlay ^{Right}
^i::SendPlay ^{Up}

^u::SendPlay {Home}
^o::SendPlay {End}

+^j::SendPlay +{Left}
+^k::SendPlay +{Down}
+^l::SendPlay +{Right}
+^i::SendPlay +{Up}

+^u::SendPlay +{Home}
+^o::SendPlay +{End}

As a follow-up:
If anybody could tell me how I can get a CapsLock+Shift+Key combo to work, I would highly appreciate it.

JSLover
  • Members
  • 920 posts
  • Last active: Nov 02 2012 09:54 PM
  • Joined: 20 Dec 2004

If anybody could tell me how I can get a CapsLock+Shift+Key combo to work, I would highly appreciate it.

...I think the only way to do it is to detect the Shift inside a Capslock & <key> hotkey...

Capslock & j::
shift:=GetKeyState("Shift") ? "Shift+":""
i++
Tooltip, %i% Capslock+%shift%J
return

Useful forum links: New content since: Last visitPast weekPast 2 weeks (links will show YOUR posts, not mine)

OMFG, the AutoHotkey forum is IP.board now (yuck!)...I may not be able to continue coming here (& I love AutoHotkey)...I liked phpBB, but not this...ugh...

Note...
I may not reply to any topics (specifically ones I was previously involved in), mostly cuz I can't find the ones I replied to, to continue helping, but also just cuz I can't stand the new forum...phpBB was soo perfect. This is 100% the opposite of "perfect".

I also semi-plan to start my own, phpBB-based AutoHotkey forum (or take over the old one, if he'll let me)
PM me if you're interested in a new phpBB-based forum (I need to know if anyone would use it)
How (or why) did they create the Neil Armstrong memorial site (neilarmstronginfo.com) BEFORE he died?