AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Portable Keyboard Layout
Goto page Previous  1, 2, 3 ... 7, 8, 9, 10, 11, 12  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
PolishStatue
Guest





PostPosted: Sat Nov 28, 2009 11:38 pm    Post subject: One handed Dvorak? Reply with quote

Does anyone have a one-handed dvorak version?
Thanks in advance Smile
Back to top
PKLer
Guest





PostPosted: Wed Jan 06, 2010 7:34 am    Post subject: Re: Using system layouts Reply with quote

Try the classic layouts! (There are Russian, Greek, Hebrew.)

It seems that the cursor is not on the left when using Hebrew in PKL . that causes disorder of Hebrew sentence . Is there any method to support RTL (right to left )languages better in PKL while not changing the system settings ?
Tanks alot !
Back to top
Long Bong



Joined: 29 Dec 2009
Posts: 12

PostPosted: Sat Mar 20, 2010 10:09 am    Post subject: Reply with quote

After using PKL for a while I think it lacks Qwerty shortcuts. I've edited pkl_main.ahk file and it's easily achievable! The method is perfectly easy. Every time you press Ctrl, Alt or Win key (not AltGr) it suspends the script giving you access to your standard layout shortcuts! Try it out yourself!

You will need source code of pkl from here:
http://sourceforge.net/projects/pkl/files/Portable%20Keyboard%20Layout/0.3/source_code_v0.3.zip/download
and the edited version of pkl_main.ahk:

Code:

#NoEnv
#Persistent
#NoTrayIcon
#InstallKeybdHook
#SingleInstance force
#MaxThreadsBuffer
#MaxThreadsPerHotkey  3
#MaxHotkeysPerInterval 300
#MaxThreads 20

setPklInfo( "version", "0.3" )
setPklInfo( "compiled", "2008.09.01." )


SendMode Event
SetBatchLines, -1
Process, Priority, , H
Process, Priority, , R
SetWorkingDir, %A_ScriptDir%

; Global variables
CurrentDeadKeys = 0 ; How many dead key were pressed
CurrentBaseKey  = 0 ; Current base key :)
TheLoop = 1

t = %1% ; Layout from command line parameter
pkl_init( t )
pkl_activate()

; ####################### the loop #######################
Loop ; This loop suspends the script when you press Control, Alt or Win key (giving you Qwerty shortcuts).
{
   If TheLoop = 1
   {
      If (!GetKeyState("Control")
      and !GetKeyState("Alt")
      and !GetKeyState("LWin")
      and !GetKeyState("RWin"))
      {
         Gosub, SuspendOff
      }
      else
      {
         If !GetKeyState("RAlt") ; prevents from suspending if it was AltGr pressed
            gosub, SuspendOn
      }
   }
Sleep, 50
}
return

; ####################### labels #######################

exitApp:
   exitApp
return

detectDeadKeysInCurrentLayout:
   setDeadKeysInCurrentLayout( detectDeadKeysInCurrentLayout() )
return

processKeyPress0:
processKeyPress1:
processKeyPress2:
processKeyPress3:
processKeyPress4:
processKeyPress5:
processKeyPress6:
processKeyPress7:
processKeyPress8:
processKeyPress9:
processKeyPress10:
processKeyPress11:
processKeyPress12:
processKeyPress13:
processKeyPress14:
processKeyPress15:
processKeyPress16:
processKeyPress17:
processKeyPress18:
processKeyPress19:
processKeyPress20:
processKeyPress21:
processKeyPress22:
processKeyPress23:
processKeyPress24:
processKeyPress25:
processKeyPress26:
processKeyPress27:
processKeyPress28:
processKeyPress29:
   runKeyPress()
return

keyPressedwoStar: ; SC025
   activity_ping()
   Critical
   ThisHotkey := A_ThisHotkey
   processKeyPress( ThisHotkey )
return

keyPressed: ; *SC025
   activity_ping()
   Critical
   ThisHotkey := substr( A_ThisHotkey, 2 )
   processKeyPress( ThisHotkey )
return

upToDownKeyPress: ; *SC025 UP
   activity_ping()
   Critical
   ThisHotkey := A_ThisHotkey
   ThisHotkey := substr( ThisHotkey, 2 )
   ThisHotkey := substr( ThisHotkey, 1, -3 )
   processKeyPress( ThisHotkey )
return

modifierDown:  ; *SC025
   activity_ping()
   Critical
   ThisHotkey := substr( A_ThisHotkey, 2 )
   setModifierState( getLayoutItem( ThisHotkey . "v" ), 1 )
return

modifierUp: ; *SC025 UP
   activity_ping()
   Critical
   ThisHotkey := A_ThisHotkey
   ThisHotkey := substr( ThisHotkey, 2 )
   ThisHotkey := substr( ThisHotkey, 1, -3 )
   setModifierState( getLayoutItem( ThisHotkey . "v" ), 0 )
return

ShowAbout:
   pkl_about()
return

displayHelpImage:
   pkl_displayHelpImage()
return

displayHelpImageToggle:
   pkl_displayHelpImage( 2 )
return

changeTheActiveLayout:
   changeLayout( getLayoutInfo( "nextLayout" ) )
return

changeLayoutMenu:
   changeLayout( getLayoutInfo( "layout" . A_ThisMenuItemPos . "code" ) )
return

doNothing:
return

ToggleSuspend:
   Suspend
   If TheLoop
      TheLoop = 0
   else
      TheLoop = 1
   gosub, SuspendSub
return

SuspendSub:
   if ( A_IsSuspended ) {
      pkl_displayHelpImage( 3 )
      Menu, tray, Icon, % getTrayIconInfo( "FileOff" ), % getTrayIconInfo( "NumOff" )
   } else {
      activity_ping( 1 )
      activity_ping( 2 )
      pkl_displayHelpImage( 4 )
      Menu, tray, Icon, % getTrayIconInfo( "FileOn" ), % getTrayIconInfo( "NumOn" )
   }
return

SuspendOn:
   Suspend, On
   gosub, SuspendSub
return

SuspendOff:
   Suspend, Off
   gosub, SuspendSub
return

; ####################### functions #######################

#Include pkl_deadkey.ahk
#Include pkl_getset.ahk
#Include pkl_gui.ahk
#Include pkl_init.ahk
#Include pkl_keypress.ahk
#Include pkl_locale.ahk
#Include pkl_send.ahk
#Include pkl_activity.ahk

; ####################### (external) modules #######################

#Include HexUC.ahk ; Written by Laszlo Hars
#Include MI.ahk ; http://www.autohotkey.com/forum/viewtopic.php?t=21991
#Include Ini.ahk ; http://www.autohotkey.net/~majkinetor/Ini/Ini.ahk
#Include SendU.ahk
#Include getGlobal.ahk
#Include HashTable.ahk
#Include iniReadBoolean.ahk
#Include detectDeadKeysInCurrentLayout.ahk
#Include virtualKeyCodeFromName.ahk
#Include getDeadKeysOfSystemsActiveLayout.ahk
#Include getLanguageStringFromDigits.ahk ; http://www.autohotkey.com/docs/misc/Languages.htm


The changes are: new variable (TheLoop), continuous loop at the beginning of the script and some other changes in Suspend label.

Simply copy-paste this into your \source\pkl_main.ahk file and replace all the content there.
Have fun!

Cheers,
Long Bong.
Back to top
View user's profile Send private message
DreymaR



Joined: 24 May 2009
Posts: 89
Location: Bćrum, Norway

PostPosted: Mon Mar 22, 2010 8:07 am    Post subject: Reply with quote

I've been using PKL for a long long while now to get the Colemak layout running on work computers and suchlike, and I haven't been missing any shortcuts.

In fact, if Ctrl-F for instance were moved back to its QWERTY position I'd find that very annoying. I hope you added an option to switch that behaviour on and off...

Could you tell us exactly what it was you were missing?
_________________
Better burden you cannot carry than man-wisdom much -- Hávamál
Back to top
View user's profile Send private message
Long Bong



Joined: 29 Dec 2009
Posts: 12

PostPosted: Tue Mar 23, 2010 3:18 pm    Post subject: Reply with quote

Well I was missing quite a lot. I use Dvorak layout. I mostly missed Control + [z, x, c, v] so yeah I find it very useful to have such option. Smile The rest isn't as important as these 4 shortcuts, but anyway I like to have my shortcuts in the qwerty way, cos in the majority of the programs are arranged in a way that makes them easy to remember. Maybe I am wrong. ~

Cheers,
Long a Bong
Back to top
View user's profile Send private message
DreymaR



Joined: 24 May 2009
Posts: 89
Location: Bćrum, Norway

PostPosted: Wed Mar 24, 2010 11:01 am    Post subject: Reply with quote

You're welcome to convert to Colemak. That would solve your problem. Wink
_________________
Better burden you cannot carry than man-wisdom much -- Hávamál
Back to top
View user's profile Send private message
Long Bong



Joined: 29 Dec 2009
Posts: 12

PostPosted: Wed Mar 24, 2010 1:56 pm    Post subject: Reply with quote

I've tried Colemak long time ago for a week or two. I find Dvorak much better because of high hands alternation. Not all people like this, but I do. Smile
Back to top
View user's profile Send private message
DreymaR



Joined: 24 May 2009
Posts: 89
Location: Bćrum, Norway

PostPosted: Thu Mar 25, 2010 8:05 am    Post subject: Reply with quote

I see. It takes a while before the good feeling from rolls kicks in, whereas hand alternation feels good immediately I think.

If you think the upsides of hand alternation is worth the downsides of dvorak, it's certainly a good layout. Guess you might benefit from your Ctrl key trick then, but it's a tricky track I feel.
_________________
Better burden you cannot carry than man-wisdom much -- Hávamál
Back to top
View user's profile Send private message
rathkopf



Joined: 22 Oct 2008
Posts: 14

PostPosted: Thu Jun 17, 2010 6:35 am    Post subject: Combining Control + Key Reply with quote

Is there any way to map an extended key to send a control + key, for example, control + left to jump a word to the left?
Back to top
View user's profile Send private message
DreymaR



Joined: 24 May 2009
Posts: 89
Location: Bćrum, Norway

PostPosted: Thu Jun 17, 2010 7:25 am    Post subject: Reply with quote

I use Extend+T (Colemak) for the Ctrl key instead, because I prefer to do this by moving keys and not by sending modified strokes. So my left hand can do the Extend key plus any modifiers, while my right hand gets the arrows and Home/End etc. - another consideration is that you'll want to modify all the arrows plus Home/End by both Shift and Ctrl at times and at those times it feels much better to have the Shift and Ctrl on your left-hand home row instead of in the corner.

However, if you send ^{Left} instead of just {Left} it should do what you want.
_________________
Better burden you cannot carry than man-wisdom much -- Hávamál
Back to top
View user's profile Send private message
rathkopf



Joined: 22 Oct 2008
Posts: 14

PostPosted: Thu Jun 17, 2010 4:30 pm    Post subject: Combined key mappings Reply with quote

@DreymaR
I tried ^Left and that didn't work (it seems the curly brackets are not required, for '{Left}' doesn't work but 'Left' does.)

I agree that sometimes you would want both control and shift. But my desire is to have [Extend] + K move one character left and [Extend] + J move a word to the left. I do this with a great program called "TouchCursor" but I'd like to have it integrated into my plk configuration. My extend section of plk.ini includes:
Code:


SC024 = ^Left      
               ; QWERTY jJ
SC025 = Left      
               ; QWERTY kK
SC026 = Right      
               ; QWERTY lL
SC027 = ^Right      
               ; QWERTY ;:
SC033 = Down      
               ; QWERTY ,<
SC034 = PgDn      
               ; QWERTY .>

SC017 = Up      
               ; QWERTY iI
SC018 = PgUp   
               ; QWERTY oO

But my SC027 and SC024 are not working.

Additionally, every time I use the Extend key (CapsLock) the caps lock state is changing. What am I doing wrong in my configuration?

Thanks for your help.
Back to top
View user's profile Send private message
DreymaR



Joined: 24 May 2009
Posts: 89
Location: Bćrum, Norway

PostPosted: Fri Jun 18, 2010 10:49 am    Post subject: Reply with quote

Oh, sorry - forgot myself.

PKL's Extend mode automatically adds the {}. So if you want to send '^{Left}' for instance you'll have to resort to a trick I discovered and describe your mapping as '}^{Left'. Hope that helps.

So for instance my ExtendMode-Undo key is mapped thus:
SC02c = }!{Backspace
(...which gives you Alt+Back and that's a system shortcut for Undo!)

About the CapsLock key: Not sure, but in my layout.ini file it just says
[global]
extend_key = CapsLock
(etc.)

That's as normal. However, in the [layout] section I have:

Code:
; *** Using 'CapsLock' as 'extend_key' works best if it is mapped but otherwise disabled
CapsLock = OEM_CAPITAL   0   --   --   --   --   --   ; CapsLock


Maybe that takes care of the state problem?

On a side note, I also remap Extend-Esc to CapsLock so I can switch Caps states with that:
SC001 = CapsLock

As for your SC027 and SC028, make sure they're properly defined in your layout.ini file according to your keyboard. There are differences in which OEM_# keys are where for instance, between my Norwegian keyboard and an US one. Also, make sure they're defined at all in the layout.ini file even if you aren't actually remapping them! If not, the Extend mode will not work with those keys. So to be able to remap the F# keys for instance, my layout.ini file contains a bunch of lines like this:
SC03b = F1 VirtualKey

A 'VirtualKey' remapping tells PKL that you're going to use this key but it shouldn't be remapped.
_________________
Better burden you cannot carry than man-wisdom much -- Hávamál
Back to top
View user's profile Send private message
rathkopf



Joined: 22 Oct 2008
Posts: 14

PostPosted: Fri Jun 18, 2010 4:00 pm    Post subject: Use modifiers with Extended Key Mappings in PLK Reply with quote

@DreymaR

Excellent. Now I think that I can do all that I need with PKL.

I had already found the option for turning off the capslock by searching past posts, but the }^{ trick is awesome. I don't know how I ever would have found that.

Quote:


PKL's Extend mode automatically adds the {}. So if you want to send '^{Left}' for instance you'll have to resort to a trick I discovered and describe your mapping as '}^{Left'. Hope that helps.

So for instance my ExtendMode-Undo key is mapped thus:
SC02c = }!{Backspace
(...which gives you Alt+Back and that's a system shortcut for Undo!)


THANK YOU!
Tusen takk!
Back to top
View user's profile Send private message
DreymaR



Joined: 24 May 2009
Posts: 89
Location: Bćrum, Norway

PostPosted: Mon Jun 21, 2010 6:27 am    Post subject: Reply with quote

Glad to be of help. It took me a good while to figure that one out for myself, I can tell you. Smile
_________________
Better burden you cannot carry than man-wisdom much -- Hávamál
Back to top
View user's profile Send private message
DreymaR



Joined: 24 May 2009
Posts: 89
Location: Bćrum, Norway

PostPosted: Mon Jun 21, 2010 9:12 am    Post subject: Reply with quote

Here's a nice tip for those who, like me, use the volume control keys via PKL's Extend key feature!

The only thing I've been missing has been a little pop-up info about whether sound is on or off, and the volume settings. I found a thread at Geekhack.org that covers this very topic. There's a really neat little app called 3RVX by Matt Malensek that gives you exactly the feature I was looking for. (Seems his own page is down right now, but you can find the app elsewhere for download.) It can start automatically on Windows startup too. Not sure how it'll work with Vista or Win7 - remains to be seen.

Apparently, one could also use the drivers for the IBM Rapid Access Keyboards to get a display up. But that sounds more iffy to me?
_________________
Better burden you cannot carry than man-wisdom much -- Hávamál
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3 ... 7, 8, 9, 10, 11, 12  Next
Page 8 of 12

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group