{"_id":"@aabuhijleh/forcefocus","_rev":"4-8004ccc12fafe0c2f056a38a76003f32","name":"@aabuhijleh/forcefocus","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@aabuhijleh/forcefocus","version":"1.0.0","description":"Node module that allows you to steal focus from other windows in Windows.","main":"lib/forcefocus.js","homepage":"https://github.com/robinwassen/forcefocus","gypfile":true,"repository":{"type":"git","url":"git://github.com/robinwassen/forcefocus.git"},"keywords":["window","focus","windows"],"scripts":{"lint":"eslint lib example && cpplint --linelength=120 --recursive src","example":"electron ./example","readme":"jsdoc2md --template docs/README.hbs lib/forcefocus.js > README.md","configure":"node-gyp configure","build":"node-gyp rebuild","rebuild":"node-gyp rebuild","rebuild-electron":"electron-rebuild -f","install":"prebuild-install || node-gyp rebuild","prebuild-release":"prebuild --all --strip"},"author":{"name":"Robin Andersson","email":"me@robinwassen.com"},"license":"Apache-2.0","engines":{"node":">=4"},"devDependencies":{"electron":"^2.0.8","electron-rebuild":"^1.8.2","eslint":"^4.19.1","jsdoc-to-markdown":"^4.0.1","prebuild":"^7.6.2"},"dependencies":{"bindings":"^1.3.0","prebuild-install":"^5.0.0"},"bugs":{"url":"https://github.com/robinwassen/forcefocus/issues"},"directories":{"doc":"docs","example":"example","lib":"lib"},"gitHead":"9ff6fa5e2b73e3305916b6d89991e1a2a845dd6e","_id":"@aabuhijleh/forcefocus@1.0.0","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-jAo7Ap2RYMzkkeT72eh7BND+Sfq8P8pT4ar+3QReN98AlTkAD5o44vkJotpjOaiD3z1n6EdYRYGzS7caz0wlcw==","shasum":"6ff2c1257f7e9bea0831c50a7a40cfda11773773","tarball":"https://registry.npmjs.org/@aabuhijleh/forcefocus/-/forcefocus-1.0.0.tgz","fileCount":15,"unpackedSize":33014,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXSreCRA9TVsSAnZWagAAah8P/j9jruH673GpPqaf/zH7\ncA+xtDRaW+YSvWjdMLe6H17/0t+gyvpUQDintuSFIclEwedSrxqhlJH+96uL\nF2DTNRbAJSSUq50Ck0iP+M5opFbVoal7NVtEOtUHaU8WV3ZcwE/4UUoZ4SgF\nQE/zbBqtl1uASe/+0Tn1pS9LWBKW6FQaF9gaeZrrUhEvWmrx6US7D/5XUUIK\nNbUt/kz5x9QBvOfRi8tIHwjMihnUSOvwCWq2iDnHT1Zd+srVjRjCmvLyrdGv\nPXtbdV7vF9VmfoaXjmKaAbvAMVTmu9RbMLUzS4VvB9BWNYW2G517+m3NDWbi\nAy3E6et0oUL/C+CtbdsTIVgh2FvnaTflajFRmtUJL7lv642kR5QS417z8ZsK\nbkBaEkoj5iQgg/3kGMYho5B5uVbtkwB+BInGMiE6zCDIM13WI0h7ui41KuY5\n9fmod0fk2Pyr2WYvQEAxHK3S42e5H18OAIuRLAkjF4CiRznMO9l7BW85XX11\nijhdJavtC3fjxXoTYiTiB/V9pFvyXt4UiuR/RL2Ciw5Uf44PEhs9xKzSsQck\ndwxg3Bo95ReRtM0gZQNokswJcjwD0RpWfjDzfEKcCdF6ZlBIiKq6YSsByiC5\naLYWVZiT8fQj7e2Y4DvIzih5Wt+z2opTW85XufIJmDsdVa59Z79TkvPspMJ6\nxTOn\r\n=RflS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIES1tIN+Qmbu1sirZ+6FGDubpkftxR+PzyMc2pIUuUVHAiBBL+y0Ai/xIu/WRX+Gf5oehi6VKJKDtBbDqUWpyX98dw=="}]},"maintainers":[{"name":"aabuhijleh","email":"aabuhijleh@asaltech.com"}],"_npmUser":{"name":"aabuhijleh","email":"aabuhijleh@asaltech.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/forcefocus_1.0.0_1566386909643_0.39212000305122663"},"_hasShrinkwrap":false},"1.0.1":{"name":"@aabuhijleh/forcefocus","version":"1.0.1","description":"Node module that allows you to steal focus from other windows in Windows.","main":"lib/forcefocus.js","homepage":"https://github.com/robinwassen/forcefocus","gypfile":true,"repository":{"type":"git","url":"git://github.com/robinwassen/forcefocus.git"},"keywords":["window","focus","windows"],"scripts":{"lint":"eslint lib example && cpplint --linelength=120 --recursive src","example":"electron ./example","readme":"jsdoc2md --template docs/README.hbs lib/forcefocus.js > README.md","configure":"node-gyp configure","build":"node-gyp rebuild","rebuild":"node-gyp rebuild","rebuild-electron":"electron-rebuild -f","install":"prebuild-install || node-gyp rebuild","prebuild-release":"prebuild --all --strip"},"author":{"name":"Robin Andersson","email":"me@robinwassen.com"},"license":"Apache-2.0","engines":{"node":">=4"},"devDependencies":{"electron":"^2.0.8","electron-rebuild":"^1.8.2","eslint":"^4.19.1","jsdoc-to-markdown":"^4.0.1","prebuild":"^7.6.2"},"dependencies":{"bindings":"^1.3.0","prebuild-install":"^5.0.0"},"bugs":{"url":"https://github.com/robinwassen/forcefocus/issues"},"directories":{"doc":"docs","example":"example","lib":"lib"},"gitHead":"9ff6fa5e2b73e3305916b6d89991e1a2a845dd6e","_id":"@aabuhijleh/forcefocus@1.0.1","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-5X/lmx662InUARvUJSJFxUXnXAVt264xyDQYmUI+5to18Jrx7FpsgCIk7Xvu7kfcLnCEavoCXw1ItqtIy3iz9A==","shasum":"0f011ba8acf83046089198adfb872337d6ecbef1","tarball":"https://registry.npmjs.org/@aabuhijleh/forcefocus/-/forcefocus-1.0.1.tgz","fileCount":15,"unpackedSize":32732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXTA4CRA9TVsSAnZWagAA/DsP/1ZGYNgA7ApsFJiBgOch\n7BylHZHR/Ap0EGk9+alsIC3gUChFNjSJdn2rCHR/kwrE0VeWNnTCmOdPajqw\nqQ4q+mBf/Mkw7SFzxu4S0r8p9xCDN6JVIQqTtxI4bCr7xNGhA6RqnJYrbEEg\nVcunNNVnKevMUDI0q/a0r+bnrnOQoFxAOWp30DxkYGg7nqhpS7UOr8IpCer8\nvBfVslXD+7+WHRZdQjlxIYyeLL6L583/C6+dJYkpnf45noW3uIDcAOM0kcZD\nmvjAPnLzucg4OBWKzT1Y0ecG04HYg31rVhvQDIwtQbvcjZ425VxsntvQ+NFC\nM6cBSE08fISc0InbbnC0g254yGQVKQBbOqAtlRzVpJw7kRZYbinIRXql20VR\nK6+ACVs6vhxUBJuI6OkyLCiZ07aLv3asIk29EpLIJtx20EOtCs91mEGvOGr9\nV1Bu+7PnU8NyAY3tANywncYy5c4EvzsJyYYuiq/EMnIHygrOBLr4kdscXLQg\n7a+9QcfZZ46flDcq2Bwk+ZplPSjF4nI8x0QhLpjNJzZl99VVlV4J5Fk/4STy\nj3VF9peKCn9+2+EwCbUVBMEvnpMnQNpaKRMr9AnpiWNkO2gnkabu7o/uQ90Z\nqR4oBNRvwYoMSTzVYk/fQAL9+c8/zjS+0Vvd9TcYsHLCIwLg6oC6kQVSVvIT\nL6+m\r\n=kZx0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBVYKnoZitCOoV2IwkwvWxqptLWJ+H335jmyhdER69M3AiEA9sp8YIrdqtJbZImJotQZLjT/kBP0HlGgozkxSduIxp4="}]},"maintainers":[{"name":"aabuhijleh","email":"aabuhijleh@asaltech.com"}],"_npmUser":{"name":"aabuhijleh","email":"aabuhijleh@asaltech.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/forcefocus_1.0.1_1566388279879_0.15381198028372367"},"_hasShrinkwrap":false},"1.0.2":{"name":"@aabuhijleh/forcefocus","version":"1.0.2","description":"Node module that allows you to steal focus from other windows in Windows.","main":"lib/forcefocus.js","homepage":"https://github.com/robinwassen/forcefocus","gypfile":true,"repository":{"type":"git","url":"git://github.com/robinwassen/forcefocus.git"},"keywords":["window","focus","windows"],"scripts":{"lint":"eslint lib example && cpplint --linelength=120 --recursive src","example":"electron ./example","readme":"jsdoc2md --template docs/README.hbs lib/forcefocus.js > README.md","configure":"node-gyp configure","build":"node-gyp rebuild","rebuild":"node-gyp rebuild","rebuild-electron":"electron-rebuild -f","install":"prebuild-install || node-gyp rebuild","prebuild-release":"prebuild --all --strip"},"author":{"name":"Robin Andersson","email":"me@robinwassen.com"},"license":"Apache-2.0","engines":{"node":">=4"},"devDependencies":{"electron":"^2.0.8","electron-rebuild":"^1.8.2","eslint":"^4.19.1","jsdoc-to-markdown":"^4.0.1","prebuild":"^7.6.2"},"dependencies":{"bindings":"^1.3.0","prebuild-install":"^5.0.0"},"bugs":{"url":"https://github.com/robinwassen/forcefocus/issues"},"directories":{"doc":"docs","example":"example","lib":"lib"},"gitHead":"e8ee14f7915f5fe39c6b13a7af0567f567e93f00","_id":"@aabuhijleh/forcefocus@1.0.2","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-kf7lSl1JIOKZHWS3I0a+VzMmhoWdY8qqPq1WUgzYm3zDO23KFGz9K0977mXYGqXQZvutmS+eisdX1VgD2aTmug==","shasum":"5d4f196494d24cffa613cdc2d5f70edd797624ec","tarball":"https://registry.npmjs.org/@aabuhijleh/forcefocus/-/forcefocus-1.0.2.tgz","fileCount":15,"unpackedSize":32732,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXTRtCRA9TVsSAnZWagAAmywP/ip8wC8U5EkrUGjPFcmQ\nfVYoFPFSY/XUiAL4hd/ZiECfLUq5cM2bB5Tzfa4P3CISfCGLnGqapogvhUke\nYVKtErTJoR2K/XRosFOmvlYa6shFU1JPdZHIe9cfmc03GbUqKfCh4UIfVMfc\nQyjjfMgcDt0vRh54BM47JU5Qf3WdLOokySQzWvLLq1319bCEf+87PTT8Cwfl\n4ZGPWyLUhPUr6CqNa0rMc2oEqdcCzfz9IAtRss6jqpbPe8FZwACT4ELan13r\n5XTFPL3nT7XkuXX3/syY1Kif3ugPpylWYq8NmUD6Pwt38Y2p3V3mawh1ekhV\nUDiAhWT/CKz9Y5ZmvvVHcCc0kwPK+Z6MhU6QgdDPsgxXY2dbgh4fFUZDslxj\nCF0zevPtzr4HdPVETAztmnX1VGa2lWF+JZZN5+KxCSSqaCyxnTsOka3PAn1V\nNh+Fo9qHnEfQV2Wadm1hnyRhZ6Cv/4Kzbim0J476qNtMW4dvi8NkKx6A2LdE\nIXPGK+kzrpqtHb0Qu7IaDR+oQPgDtJJOnCQZfGb/OsaTijkynYpEeshZQfVx\na2R2q7HMOFfDmhKwMBQkftJsqvoBspTGG4pz2YDiQ1eSwr/Mh9qzEZmDFfpy\nCRJumA3FQPHuttDa5k5CFQjgIGiog2gtB0nbpl/ZSM1vUAAgYF5DmKx2GHIV\ndfaT\r\n=GhoI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCywX2YgljlzrVkOKDwsIyuj7k9taF1wyrj74455DYz6wIgZ8cI1XTrLOWgtVCzzWMAX5lEggDeNOawjw0d5eviHlY="}]},"maintainers":[{"name":"aabuhijleh","email":"aabuhijleh@asaltech.com"}],"_npmUser":{"name":"aabuhijleh","email":"aabuhijleh@asaltech.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/forcefocus_1.0.2_1566389356779_0.007719378213519867"},"_hasShrinkwrap":false},"1.0.3":{"name":"@aabuhijleh/forcefocus","version":"1.0.3","description":"Node module that allows you to steal focus from other windows in Windows.","main":"lib/forcefocus.js","homepage":"https://github.com/robinwassen/forcefocus","gypfile":true,"repository":{"type":"git","url":"git://github.com/robinwassen/forcefocus.git"},"keywords":["window","focus","windows"],"scripts":{"lint":"eslint lib example && cpplint --linelength=120 --recursive src","example":"electron ./example","readme":"jsdoc2md --template docs/README.hbs lib/forcefocus.js > README.md","configure":"node-gyp configure","build":"node-gyp rebuild","rebuild":"node-gyp rebuild","rebuild-electron":"electron-rebuild -f","install":"prebuild-install || node-gyp rebuild","prebuild-release":"prebuild --all --strip"},"author":{"name":"Robin Andersson","email":"me@robinwassen.com"},"license":"Apache-2.0","engines":{"node":">=4"},"devDependencies":{"electron":"^2.0.8","electron-rebuild":"^1.8.2","eslint":"^4.19.1","jsdoc-to-markdown":"^4.0.1","prebuild":"^7.6.2"},"dependencies":{"prebuild-install":"^5.0.0"},"bugs":{"url":"https://github.com/robinwassen/forcefocus/issues"},"directories":{"doc":"docs","example":"example","lib":"lib"},"gitHead":"e8ee14f7915f5fe39c6b13a7af0567f567e93f00","_id":"@aabuhijleh/forcefocus@1.0.3","_nodeVersion":"12.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-qAid6ZQSAJlhY+2ZqDE2bUDFR1+wjzX+Yiqv9wT6abenivQDcxbD71QkPyUihnJjJLyRJk5c+o57xWecqgWWSw==","shasum":"8134b91734701daf2aae4b5cc0dd7dcb8ce1c4e9","tarball":"https://registry.npmjs.org/@aabuhijleh/forcefocus/-/forcefocus-1.0.3.tgz","fileCount":15,"unpackedSize":32676,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdXUHxCRA9TVsSAnZWagAArW8QAIBJ+BiIJQEA3qfmMXN0\n72+0hkGy+kDfdsPHnl6M7fvG+wpFcllpjDGjID/QaTO6fZGeYlAcVrYKQKKj\n3dnQaIwVvhKrz1G9eJmihd0OVx532RVy8Kac2MQ/AT0Fu1qQqNvzMk6yb3N8\nA0ux0CCS+aClQv/7Op/+ceDrBerwnfp0fH/cq4rQMYjJfR2Az8380UhnBXao\n6lK470qBFFeRYlxJv6WMi7MEV8O27C11Kle6zBry/e3JyQVNaVFjRT+wi6m+\nNMEn5hp7ZqK/Jo31x50Leqw1Ab+gr4sABN8HpcQP7e/zSDn+X3rxn7aatir9\nNOSJp/Kp1HwtJ+mMbwDjXITtaw3iGVVeqiIAfg/7jgg2k5DiebSztVmTzEGq\n6Ah3KWmtpphwWdNJ8rFJiD551jLgrd4O+iOC3T8b9WhVaXAxrxBGdufq8oxb\n+O86LBinvQbHPJ5E62Y1guG2ffiw2jU8DsSLhEY+6eVXG3ZOekoYoQiajEFQ\nob5FOtQ/c16pZCoDexg813J3qnRxVjOOB2u4hT+j+8FpwDK0Z0tTLGBqMnRY\nqLexF6/ZAk9BIPXtvn+6cO2rgu9XuX4IwXJiRCsG5hX4kFx+tpW3aW2/Q2tw\nYV8vg+kKKcdiTMTMCQuTmy5AJB1GASCAzEqv82q6eq5BIrfarWRR9wkUhaji\nJcf6\r\n=KDuj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAoaTtGLdRVnDdrE25iXsp4q9hpV64tX7xZ+KaGpXKIRAiA6Thza6jwGkkKkwR81K5EeykfiU1uQJk2H6P/Frwj9Dg=="}]},"maintainers":[{"name":"aabuhijleh","email":"aabuhijleh@asaltech.com"}],"_npmUser":{"name":"aabuhijleh","email":"aabuhijleh@asaltech.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/forcefocus_1.0.3_1566392816993_0.10160350377720206"},"_hasShrinkwrap":false}},"time":{"created":"2019-08-21T11:28:29.421Z","1.0.0":"2019-08-21T11:28:29.800Z","modified":"2022-04-04T10:54:52.878Z","1.0.1":"2019-08-21T11:51:20.033Z","1.0.2":"2019-08-21T12:09:16.878Z","1.0.3":"2019-08-21T13:06:57.126Z"},"maintainers":[{"name":"aabuhijleh","email":"aabuhijleh@asaltech.com"}],"description":"Node module that allows you to steal focus from other windows in Windows.","homepage":"https://github.com/robinwassen/forcefocus","keywords":["window","focus","windows"],"repository":{"type":"git","url":"git://github.com/robinwassen/forcefocus.git"},"author":{"name":"Robin Andersson","email":"me@robinwassen.com"},"bugs":{"url":"https://github.com/robinwassen/forcefocus/issues"},"license":"Apache-2.0","readme":"<!-- Make sure you edit doc/README.hbs rather than README.md because the latter is auto-generated -->\r\n\r\nforcefocus\r\n=========\r\n\r\n> Node module that allows you to steal focus from other windows in Windows.\r\n\r\n[![npm](https://img.shields.io/npm/dw/forcefocus.svg)](https://npmjs.com/package/forcefocus)\r\n[![NpmVersion](https://img.shields.io/npm/v/forcefocus.svg)](https://npmjs.com/package/forcefocus)\r\n[![NpmLicense](https://img.shields.io/npm/l/forcefocus.svg)](https://npmjs.com/package/forcefocus)\r\n[![AppVeyor branch](https://img.shields.io/appveyor/ci/robinwassen/forcefocus/master.svg?logo=appveyor)](https://ci.appveyor.com/project/robinwassen/forcefocus)\r\n[![Travis (.org) branch](https://img.shields.io/travis/robinwassen/forcefocus/master.svg?logo=travis)](https://travis-ci.org/robinwassen/forcefocus)\r\n\r\nMicrosoft changed the implementation of [SetFocus()](https://msdn.microsoft.com/en-us/library/windows/desktop/ms646312(v=vs.85).aspx) to only allow an app to grant focus to other windows if it currenly holds the focus. If an app that does not have the focus tries to take it, the taskbar will just flash rather than focusing the window. These changes was probably done to improve the user experience, so users would not be disturbed by the focused application suddenly switching.\r\n\r\nThis module circumvents the restrictions in SetFocus() and allows any window to steal the focus.\r\n\r\nIt reuses the Electron built-in focus on other platforms.\r\n\r\nInstallation\r\n------------\r\n\r\nInstall `forcefocus` by running:\r\n\r\n```sh\r\n$ npm install --save forcefocus\r\n```\r\n\r\nNative binaries for win, mac and linux are prebuilt and downloaded when the module is installed.\r\n\r\nDocumentation\r\n-------------\r\n\r\n<a name=\"module_forcefocus.focusWindow\"></a>\r\n\r\n### forcefocus.focusWindow(window)\r\n**Kind**: static method of [<code>forcefocus</code>](#module_forcefocus)  \r\n**Summary**: Force focus on a Window  \r\n**Access**: public  \r\n\r\n| Param | Type | Description |\r\n| --- | --- | --- |\r\n| window | <code>BrowserWindow</code> | Window to focus |\r\n\r\n**Example**  \r\n```js\r\nconst forceFocus = require('forcefocus');\r\nconst currentWindow = require('electron').remote.getCurrentWindow();\r\n\r\nforceFocus.focusWindow(currentWindow);\r\n```\r\n\r\nExample application\r\n-------------\r\n\r\n![Example application gif](./media/forcefocus-example.gif)\r\n\r\nAn example application is located in the `/example/` dir, start it by running:\r\n\r\n```sh\r\n$ npm run example\r\n```\r\n\r\nContribute\r\n----------\r\n\r\nFeel free to contribute to this module.\r\n\r\nBefore submitting a PR, please make sure that the linter runs without any warning:\r\n\r\n```sh\r\n$ npm run lint\r\n```\r\n\r\nLicense\r\n-------\r\n\r\nThe project is licensed under the Apache 2.0 license.\r\n","readmeFilename":"README.md"}