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, 4, 5, 6, 7, 8
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
PolishStatue
Guest





PostPosted: Sun Nov 29, 2009 12:38 am    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 8: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: 5

PostPosted: Sat Mar 20, 2010 11: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
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8
Page 8 of 8

 
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