<?xml version="1.0" encoding="UTF-8"?>

<!--XBRL Document Created with the Workiva Platform-->
<!--Copyright 2024 Workiva-->
<!--r:45a00a11-19f6-4ade-9a23-3587fdeb5e78,g:1f85d63a-b371-4f08-916c-112d4f078316-->
<link:linkbase xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xbrldt="http://xbrl.org/2005/xbrldt" xsi:schemaLocation="http://www.xbrl.org/2003/linkbase http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd">
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/all" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#all"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#hypercube-dimension"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-default"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#dimension-domain"/>
  <link:arcroleRef arcroleURI="http://xbrl.org/int/dim/arcrole/domain-member" xlink:type="simple" xlink:href="http://www.xbrl.org/2005/xbrldt-2005.xsd#domain-member"/>
  <link:roleRef roleURI="http://www.keytronic.com/role/CONSOLIDATEDSTATEMENTSOFSHAREHOLDERSEQUITY" xlink:type="simple" xlink:href="ktcc-20240330.xsd#CONSOLIDATEDSTATEMENTSOFSHAREHOLDERSEQUITY"/>
  <link:definitionLink xlink:role="http://www.keytronic.com/role/CONSOLIDATEDSTATEMENTSOFSHAREHOLDERSEQUITY" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementLineItems_a3adcefa-4b30-4f0b-80d0-2a167d955863" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementTable_30fa6832-a1e6-4c3c-8710-4fe69b650a08" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_StatementLineItems_a3adcefa-4b30-4f0b-80d0-2a167d955863" xlink:to="loc_us-gaap_StatementTable_30fa6832-a1e6-4c3c-8710-4fe69b650a08" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StatementEquityComponentsAxis_4476d6ac-1573-467b-9952-835b1faf2646" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StatementEquityComponentsAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_StatementTable_30fa6832-a1e6-4c3c-8710-4fe69b650a08" xlink:to="loc_us-gaap_StatementEquityComponentsAxis_4476d6ac-1573-467b-9952-835b1faf2646" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_4476d6ac-1573-467b-9952-835b1faf2646_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_4476d6ac-1573-467b-9952-835b1faf2646" xlink:to="loc_us-gaap_EquityComponentDomain_4476d6ac-1573-467b-9952-835b1faf2646_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EquityComponentDomain_884234fc-c209-46bb-a9c1-ce5b014ef957" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EquityComponentDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_StatementEquityComponentsAxis_4476d6ac-1573-467b-9952-835b1faf2646" xlink:to="loc_us-gaap_EquityComponentDomain_884234fc-c209-46bb-a9c1-ce5b014ef957" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockMember_2020f332-430d-40d9-ab1f-dec0918352ef" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_884234fc-c209-46bb-a9c1-ce5b014ef957" xlink:to="loc_us-gaap_CommonStockMember_2020f332-430d-40d9-ab1f-dec0918352ef" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RetainedEarningsMember_c362e4f2-f045-41ac-8987-33199deb1a2c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RetainedEarningsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_884234fc-c209-46bb-a9c1-ce5b014ef957" xlink:to="loc_us-gaap_RetainedEarningsMember_c362e4f2-f045-41ac-8987-33199deb1a2c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_132219fc-0286-4144-929f-9e17a6cfa7c5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_EquityComponentDomain_884234fc-c209-46bb-a9c1-ce5b014ef957" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeMember_132219fc-0286-4144-929f-9e17a6cfa7c5" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1b37a57a-3c2d-4d94-8fd1-1741d55ac704" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncreaseDecreaseInStockholdersEquityRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_StatementLineItems_a3adcefa-4b30-4f0b-80d0-2a167d955863" xlink:to="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1b37a57a-3c2d-4d94-8fd1-1741d55ac704" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_bc1604f7-5f90-4e30-a589-ddd104b782e2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1b37a57a-3c2d-4d94-8fd1-1741d55ac704" xlink:to="loc_us-gaap_StockholdersEquity_bc1604f7-5f90-4e30-a589-ddd104b782e2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockSharesOutstanding_7bcb7273-abc4-4280-a729-269c9682cc9a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockSharesOutstanding"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1b37a57a-3c2d-4d94-8fd1-1741d55ac704" xlink:to="loc_us-gaap_CommonStockSharesOutstanding_7bcb7273-abc4-4280-a729-269c9682cc9a" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensationGross_87b23650-0e6d-4b9d-9877-d22556817e84" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensationGross"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1b37a57a-3c2d-4d94-8fd1-1741d55ac704" xlink:to="loc_us-gaap_StockIssuedDuringPeriodSharesShareBasedCompensationGross_87b23650-0e6d-4b9d-9877-d22556817e84" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockGrantedDuringPeriodValueSharebasedCompensation_d3895e9b-1f2b-462e-9cd4-2cbe030ed95b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockGrantedDuringPeriodValueSharebasedCompensation"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1b37a57a-3c2d-4d94-8fd1-1741d55ac704" xlink:to="loc_us-gaap_StockGrantedDuringPeriodValueSharebasedCompensation_d3895e9b-1f2b-462e-9cd4-2cbe030ed95b" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised_112a6482-cdf1-43a8-a102-18d6e3f91fdb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1b37a57a-3c2d-4d94-8fd1-1741d55ac704" xlink:to="loc_us-gaap_StockIssuedDuringPeriodValueStockOptionsExercised_112a6482-cdf1-43a8-a102-18d6e3f91fdb" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_835203bb-73a2-4548-be43-0c885ab66a7c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1b37a57a-3c2d-4d94-8fd1-1741d55ac704" xlink:to="loc_us-gaap_NetIncomeLoss_835203bb-73a2-4548-be43-0c885ab66a7c" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossAfterReclassificationAndTax_dd44ed11-6a00-4623-9d74-612f1896a514" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossAfterReclassificationAndTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncreaseDecreaseInStockholdersEquityRollForward_1b37a57a-3c2d-4d94-8fd1-1741d55ac704" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossAfterReclassificationAndTax_dd44ed11-6a00-4623-9d74-612f1896a514" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockholdersEquity_9c04bd34-715f-4869-af5d-37d7facfa9db" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockholdersEquity"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CommonStockSharesOutstanding_c4da072b-68ad-4c00-9a27-2d9598508853" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CommonStockSharesOutstanding"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.keytronic.com/role/BasisofPresentationDetails" xlink:type="simple" xlink:href="ktcc-20240330.xsd#BasisofPresentationDetails"/>
  <link:definitionLink xlink:role="http://www.keytronic.com/role/BasisofPresentationDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentLineItems_de833594-6b29-4d97-a6e5-05c25f85c07e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentTable_80fb0b19-14a4-47cb-b8b8-7aad8237a378" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DebtInstrumentLineItems_de833594-6b29-4d97-a6e5-05c25f85c07e" xlink:to="loc_us-gaap_DebtInstrumentTable_80fb0b19-14a4-47cb-b8b8-7aad8237a378" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentAxis_233c424a-9627-4706-bb2f-c85dd52c44de" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_80fb0b19-14a4-47cb-b8b8-7aad8237a378" xlink:to="loc_us-gaap_DebtInstrumentAxis_233c424a-9627-4706-bb2f-c85dd52c44de" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_233c424a-9627-4706-bb2f-c85dd52c44de_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_233c424a-9627-4706-bb2f-c85dd52c44de" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_233c424a-9627-4706-bb2f-c85dd52c44de_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_ce96af1c-624d-4ce0-a267-a9d5945a2c52" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_233c424a-9627-4706-bb2f-c85dd52c44de" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_ce96af1c-624d-4ce0-a267-a9d5945a2c52" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_ktcc_BanorteFinancialGroupMember_87d3b489-4b2b-43ff-b47b-3cdd1640f8ef" xlink:href="ktcc-20240330.xsd#ktcc_BanorteFinancialGroupMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_ce96af1c-624d-4ce0-a267-a9d5945a2c52" xlink:to="loc_ktcc_BanorteFinancialGroupMember_87d3b489-4b2b-43ff-b47b-3cdd1640f8ef" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingIncomeLoss_f8e0a7c7-2dc3-4f24-a0ee-f9d66fbd7375" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_de833594-6b29-4d97-a6e5-05c25f85c07e" xlink:to="loc_us-gaap_OperatingIncomeLoss_f8e0a7c7-2dc3-4f24-a0ee-f9d66fbd7375" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_NetIncomeLoss_33a3163e-db4e-4096-a926-34050b57cd65" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_NetIncomeLoss"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_de833594-6b29-4d97-a6e5-05c25f85c07e" xlink:to="loc_us-gaap_NetIncomeLoss_33a3163e-db4e-4096-a926-34050b57cd65" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_ktcc_OperatingWorkingCapital_1268395f-10f2-4d33-9065-87a22786c35c" xlink:href="ktcc-20240330.xsd#ktcc_OperatingWorkingCapital"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_de833594-6b29-4d97-a6e5-05c25f85c07e" xlink:to="loc_ktcc_OperatingWorkingCapital_1268395f-10f2-4d33-9065-87a22786c35c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditFacilityRemainingBorrowingCapacity_a902fc47-db96-4083-ac1b-53b40c1f3f45" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LineOfCreditFacilityRemainingBorrowingCapacity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_de833594-6b29-4d97-a6e5-05c25f85c07e" xlink:to="loc_us-gaap_LineOfCreditFacilityRemainingBorrowingCapacity_a902fc47-db96-4083-ac1b-53b40c1f3f45" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_857c3620-fd3f-402e-8f41-03d3f51b4cf0" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CashAndCashEquivalentsAtCarryingValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentLineItems_de833594-6b29-4d97-a6e5-05c25f85c07e" xlink:to="loc_us-gaap_CashAndCashEquivalentsAtCarryingValue_857c3620-fd3f-402e-8f41-03d3f51b4cf0" xlink:type="arc" order="4"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.keytronic.com/role/LongTermDebtNarrativeDetails" xlink:type="simple" xlink:href="ktcc-20240330.xsd#LongTermDebtNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.keytronic.com/role/LongTermDebtNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_ktcc_DebtDisclosureLineItems_7356dc78-7b99-475c-9d2a-d758215a64cc" xlink:href="ktcc-20240330.xsd#ktcc_DebtDisclosureLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentTable_f3606e8d-127f-42d9-b6c9-0fd42ebd7cd8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_ktcc_DebtDisclosureLineItems_7356dc78-7b99-475c-9d2a-d758215a64cc" xlink:to="loc_us-gaap_DebtInstrumentTable_f3606e8d-127f-42d9-b6c9-0fd42ebd7cd8" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CreditFacilityAxis_8a304066-c348-4fdf-894d-c87ca5b6f99e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CreditFacilityAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_f3606e8d-127f-42d9-b6c9-0fd42ebd7cd8" xlink:to="loc_us-gaap_CreditFacilityAxis_8a304066-c348-4fdf-894d-c87ca5b6f99e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CreditFacilityDomain_8a304066-c348-4fdf-894d-c87ca5b6f99e_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CreditFacilityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_CreditFacilityAxis_8a304066-c348-4fdf-894d-c87ca5b6f99e" xlink:to="loc_us-gaap_CreditFacilityDomain_8a304066-c348-4fdf-894d-c87ca5b6f99e_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CreditFacilityDomain_b7c26364-f60e-4034-a2bb-7e120b1fe556" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CreditFacilityDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_CreditFacilityAxis_8a304066-c348-4fdf-894d-c87ca5b6f99e" xlink:to="loc_us-gaap_CreditFacilityDomain_b7c26364-f60e-4034-a2bb-7e120b1fe556" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_ktcc_WellsFargoBankMember_42854188-fa9a-4d80-80a2-230b40965ed2" xlink:href="ktcc-20240330.xsd#ktcc_WellsFargoBankMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CreditFacilityDomain_b7c26364-f60e-4034-a2bb-7e120b1fe556" xlink:to="loc_ktcc_WellsFargoBankMember_42854188-fa9a-4d80-80a2-230b40965ed2" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_ktcc_BankOfAmericaMember_0f0da595-80f4-48c7-ba0f-62a446d9db04" xlink:href="ktcc-20240330.xsd#ktcc_BankOfAmericaMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CreditFacilityDomain_b7c26364-f60e-4034-a2bb-7e120b1fe556" xlink:to="loc_ktcc_BankOfAmericaMember_0f0da595-80f4-48c7-ba0f-62a446d9db04" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_RevolvingCreditFacilityMember_93a5877f-a64d-470a-81fc-562dcd7b9bb9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_RevolvingCreditFacilityMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_CreditFacilityDomain_b7c26364-f60e-4034-a2bb-7e120b1fe556" xlink:to="loc_us-gaap_RevolvingCreditFacilityMember_93a5877f-a64d-470a-81fc-562dcd7b9bb9" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeAxis_aa0c42f0-c6ea-4d2a-80d5-6cc14e27cc08" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_f3606e8d-127f-42d9-b6c9-0fd42ebd7cd8" xlink:to="loc_us-gaap_LongtermDebtTypeAxis_aa0c42f0-c6ea-4d2a-80d5-6cc14e27cc08" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_aa0c42f0-c6ea-4d2a-80d5-6cc14e27cc08_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_aa0c42f0-c6ea-4d2a-80d5-6cc14e27cc08" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_aa0c42f0-c6ea-4d2a-80d5-6cc14e27cc08_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongtermDebtTypeDomain_ce4c8b1f-961a-42d0-a6af-28bf813f8ffd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongtermDebtTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_LongtermDebtTypeAxis_aa0c42f0-c6ea-4d2a-80d5-6cc14e27cc08" xlink:to="loc_us-gaap_LongtermDebtTypeDomain_ce4c8b1f-961a-42d0-a6af-28bf813f8ffd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditMember_a4cad7af-e0fb-49d7-886b-8631f128c6c1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LineOfCreditMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_ce4c8b1f-961a-42d0-a6af-28bf813f8ffd" xlink:to="loc_us-gaap_LineOfCreditMember_a4cad7af-e0fb-49d7-886b-8631f128c6c1" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_ktcc_EquipmentTermLoanMember_58e2a8c7-7e14-4267-b898-e0ef56208632" xlink:href="ktcc-20240330.xsd#ktcc_EquipmentTermLoanMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_ce4c8b1f-961a-42d0-a6af-28bf813f8ffd" xlink:to="loc_ktcc_EquipmentTermLoanMember_58e2a8c7-7e14-4267-b898-e0ef56208632" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_ktcc_JZEquipmentTermLoanMember_704739b8-3e18-4610-a654-e1faadd6d4af" xlink:href="ktcc-20240330.xsd#ktcc_JZEquipmentTermLoanMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LongtermDebtTypeDomain_ce4c8b1f-961a-42d0-a6af-28bf813f8ffd" xlink:to="loc_ktcc_JZEquipmentTermLoanMember_704739b8-3e18-4610-a654-e1faadd6d4af" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableRateAxis_a6327c4b-0ded-4c41-97bf-9a121265d9ea" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_VariableRateAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_f3606e8d-127f-42d9-b6c9-0fd42ebd7cd8" xlink:to="loc_us-gaap_VariableRateAxis_a6327c4b-0ded-4c41-97bf-9a121265d9ea" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableRateDomain_a6327c4b-0ded-4c41-97bf-9a121265d9ea_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_VariableRateDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_VariableRateAxis_a6327c4b-0ded-4c41-97bf-9a121265d9ea" xlink:to="loc_us-gaap_VariableRateDomain_a6327c4b-0ded-4c41-97bf-9a121265d9ea_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableRateDomain_a64d4365-5c1a-4142-a9ce-757b8fab5785" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_VariableRateDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_VariableRateAxis_a6327c4b-0ded-4c41-97bf-9a121265d9ea" xlink:to="loc_us-gaap_VariableRateDomain_a64d4365-5c1a-4142-a9ce-757b8fab5785" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FederalFundsEffectiveSwapRateMember_7a85068a-c6fc-40d7-9e60-e97be298627b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FederalFundsEffectiveSwapRateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableRateDomain_a64d4365-5c1a-4142-a9ce-757b8fab5785" xlink:to="loc_us-gaap_FederalFundsEffectiveSwapRateMember_7a85068a-c6fc-40d7-9e60-e97be298627b" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_ktcc_SecuredOvernightFinancingRateSOFRMember_3c42e693-57aa-449d-b01b-ad88cde6e83d" xlink:href="ktcc-20240330.xsd#ktcc_SecuredOvernightFinancingRateSOFRMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableRateDomain_a64d4365-5c1a-4142-a9ce-757b8fab5785" xlink:to="loc_ktcc_SecuredOvernightFinancingRateSOFRMember_3c42e693-57aa-449d-b01b-ad88cde6e83d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_BaseRateMember_79a46009-b8ad-49dc-af09-86df7eda5979" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_BaseRateMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_VariableRateDomain_a64d4365-5c1a-4142-a9ce-757b8fab5785" xlink:to="loc_us-gaap_BaseRateMember_79a46009-b8ad-49dc-af09-86df7eda5979" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_4229de1c-6a41-4ceb-85f3-2c9a432dee16" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_f3606e8d-127f-42d9-b6c9-0fd42ebd7cd8" xlink:to="loc_srt_RangeAxis_4229de1c-6a41-4ceb-85f3-2c9a432dee16" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_4229de1c-6a41-4ceb-85f3-2c9a432dee16_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_4229de1c-6a41-4ceb-85f3-2c9a432dee16" xlink:to="loc_srt_RangeMember_4229de1c-6a41-4ceb-85f3-2c9a432dee16_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_b8a2cb3a-6a0c-4177-85df-9ea172ec252e" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_4229de1c-6a41-4ceb-85f3-2c9a432dee16" xlink:to="loc_srt_RangeMember_b8a2cb3a-6a0c-4177-85df-9ea172ec252e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_6ec7710b-75ea-47c9-bf19-c32187fd7597" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_b8a2cb3a-6a0c-4177-85df-9ea172ec252e" xlink:to="loc_srt_MinimumMember_6ec7710b-75ea-47c9-bf19-c32187fd7597" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_a453968f-6cb4-4030-9705-ae2987c35289" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_b8a2cb3a-6a0c-4177-85df-9ea172ec252e" xlink:to="loc_srt_MaximumMember_a453968f-6cb4-4030-9705-ae2987c35289" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentAxis_928b17a1-a6aa-4935-b262-01c1b8bda3a8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_f3606e8d-127f-42d9-b6c9-0fd42ebd7cd8" xlink:to="loc_us-gaap_DebtInstrumentAxis_928b17a1-a6aa-4935-b262-01c1b8bda3a8" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_928b17a1-a6aa-4935-b262-01c1b8bda3a8_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_928b17a1-a6aa-4935-b262-01c1b8bda3a8" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_928b17a1-a6aa-4935-b262-01c1b8bda3a8_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_50553fd3-c437-4256-9bed-3e3d9c7bdb4c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_928b17a1-a6aa-4935-b262-01c1b8bda3a8" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_50553fd3-c437-4256-9bed-3e3d9c7bdb4c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_ktcc_BanorteFinancialGroupMember_aefe1dee-76a1-474c-9621-0def5f5b693c" xlink:href="ktcc-20240330.xsd#ktcc_BanorteFinancialGroupMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_50553fd3-c437-4256-9bed-3e3d9c7bdb4c" xlink:to="loc_ktcc_BanorteFinancialGroupMember_aefe1dee-76a1-474c-9621-0def5f5b693c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_ktcc_AmericBankEquipmentFinancingArrangementMember_dfe7a798-e54a-48a3-bd36-75de503f88b7" xlink:href="ktcc-20240330.xsd#ktcc_AmericBankEquipmentFinancingArrangementMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_50553fd3-c437-4256-9bed-3e3d9c7bdb4c" xlink:to="loc_ktcc_AmericBankEquipmentFinancingArrangementMember_dfe7a798-e54a-48a3-bd36-75de503f88b7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeAxis_90135dcb-c2d9-4577-991d-53108f724343" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_f3606e8d-127f-42d9-b6c9-0fd42ebd7cd8" xlink:to="loc_us-gaap_SubsequentEventTypeAxis_90135dcb-c2d9-4577-991d-53108f724343" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_90135dcb-c2d9-4577-991d-53108f724343_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_90135dcb-c2d9-4577-991d-53108f724343" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_90135dcb-c2d9-4577-991d-53108f724343_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventTypeDomain_5824b76b-6f07-47ae-b5bc-ee977690ff8a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_SubsequentEventTypeAxis_90135dcb-c2d9-4577-991d-53108f724343" xlink:to="loc_us-gaap_SubsequentEventTypeDomain_5824b76b-6f07-47ae-b5bc-ee977690ff8a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SubsequentEventMember_ee1a0294-6d97-42eb-8718-a5ec591ebe45" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SubsequentEventMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_SubsequentEventTypeDomain_5824b76b-6f07-47ae-b5bc-ee977690ff8a" xlink:to="loc_us-gaap_SubsequentEventMember_ee1a0294-6d97-42eb-8718-a5ec591ebe45" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_StatementScenarioAxis_d0e22f68-8a0b-48b0-a39d-daf2aa49260e" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_StatementScenarioAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DebtInstrumentTable_f3606e8d-127f-42d9-b6c9-0fd42ebd7cd8" xlink:to="loc_srt_StatementScenarioAxis_d0e22f68-8a0b-48b0-a39d-daf2aa49260e" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ScenarioUnspecifiedDomain_d0e22f68-8a0b-48b0-a39d-daf2aa49260e_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ScenarioUnspecifiedDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_StatementScenarioAxis_d0e22f68-8a0b-48b0-a39d-daf2aa49260e" xlink:to="loc_srt_ScenarioUnspecifiedDomain_d0e22f68-8a0b-48b0-a39d-daf2aa49260e_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ScenarioUnspecifiedDomain_78cd84e1-74ef-4bab-9154-ba8b6b453825" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ScenarioUnspecifiedDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_StatementScenarioAxis_d0e22f68-8a0b-48b0-a39d-daf2aa49260e" xlink:to="loc_srt_ScenarioUnspecifiedDomain_78cd84e1-74ef-4bab-9154-ba8b6b453825" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_ScenarioForecastMember_133ab9bf-a34a-411e-b7bb-7769c1ed2c72" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_ScenarioForecastMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_ScenarioUnspecifiedDomain_78cd84e1-74ef-4bab-9154-ba8b6b453825" xlink:to="loc_srt_ScenarioForecastMember_133ab9bf-a34a-411e-b7bb-7769c1ed2c72" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCredit_8e64ea6e-a30d-42f4-ae11-eb3395c1d6e7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LineOfCredit"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_DebtDisclosureLineItems_7356dc78-7b99-475c-9d2a-d758215a64cc" xlink:to="loc_us-gaap_LineOfCredit_8e64ea6e-a30d-42f4-ae11-eb3395c1d6e7" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_eced899f-d8c1-4ea4-b185-4428b2749569" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_DebtDisclosureLineItems_7356dc78-7b99-475c-9d2a-d758215a64cc" xlink:to="loc_us-gaap_LineOfCreditFacilityMaximumBorrowingCapacity_eced899f-d8c1-4ea4-b185-4428b2749569" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentInterestRateIncreaseDecrease_3a7a072c-8117-4c77-b9a1-c5c177a2dedf" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentInterestRateIncreaseDecrease"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_DebtDisclosureLineItems_7356dc78-7b99-475c-9d2a-d758215a64cc" xlink:to="loc_us-gaap_DebtInstrumentInterestRateIncreaseDecrease_3a7a072c-8117-4c77-b9a1-c5c177a2dedf" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_ktcc_DebtInstrumentDebtCovenantRatio_1f970be3-0f66-46fd-834c-f467e7ee4445" xlink:href="ktcc-20240330.xsd#ktcc_DebtInstrumentDebtCovenantRatio"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_DebtDisclosureLineItems_7356dc78-7b99-475c-9d2a-d758215a64cc" xlink:to="loc_ktcc_DebtInstrumentDebtCovenantRatio_1f970be3-0f66-46fd-834c-f467e7ee4445" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_ktcc_DebtInstrumentDecreaseInMaturityPeriod_e6e4762b-94e9-4aaf-8e01-996ea94a31cf" xlink:href="ktcc-20240330.xsd#ktcc_DebtInstrumentDecreaseInMaturityPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_DebtDisclosureLineItems_7356dc78-7b99-475c-9d2a-d758215a64cc" xlink:to="loc_ktcc_DebtInstrumentDecreaseInMaturityPeriod_e6e4762b-94e9-4aaf-8e01-996ea94a31cf" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LettersOfCreditOutstandingAmount_044676bd-7856-4d8d-b638-693e77d4704f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LettersOfCreditOutstandingAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_DebtDisclosureLineItems_7356dc78-7b99-475c-9d2a-d758215a64cc" xlink:to="loc_us-gaap_LettersOfCreditOutstandingAmount_044676bd-7856-4d8d-b638-693e77d4704f" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditFacilityRemainingBorrowingCapacity_d75199b6-51c0-42f8-aa15-922877bcaf7c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LineOfCreditFacilityRemainingBorrowingCapacity"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_DebtDisclosureLineItems_7356dc78-7b99-475c-9d2a-d758215a64cc" xlink:to="loc_us-gaap_LineOfCreditFacilityRemainingBorrowingCapacity_d75199b6-51c0-42f8-aa15-922877bcaf7c" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentBasisSpreadOnVariableRate1_7f797b40-9d9e-4423-9301-0b8284186646" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentBasisSpreadOnVariableRate1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_DebtDisclosureLineItems_7356dc78-7b99-475c-9d2a-d758215a64cc" xlink:to="loc_us-gaap_DebtInstrumentBasisSpreadOnVariableRate1_7f797b40-9d9e-4423-9301-0b8284186646" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_1b76d9c9-d66d-4a43-9a06-acfc9f6a5dcb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentInterestRateStatedPercentage"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_DebtDisclosureLineItems_7356dc78-7b99-475c-9d2a-d758215a64cc" xlink:to="loc_us-gaap_DebtInstrumentInterestRateStatedPercentage_1b76d9c9-d66d-4a43-9a06-acfc9f6a5dcb" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_ktcc_LineOfCreditFacilityPercentageAdditionalInterestRateOnDefault_36764029-7fbc-4d9c-8bcc-f7fc35b09ff0" xlink:href="ktcc-20240330.xsd#ktcc_LineOfCreditFacilityPercentageAdditionalInterestRateOnDefault"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_DebtDisclosureLineItems_7356dc78-7b99-475c-9d2a-d758215a64cc" xlink:to="loc_ktcc_LineOfCreditFacilityPercentageAdditionalInterestRateOnDefault_36764029-7fbc-4d9c-8bcc-f7fc35b09ff0" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LineOfCreditFacilityCommitmentFeePercentage_4af79f32-5412-4ede-974b-674e96575c46" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LineOfCreditFacilityCommitmentFeePercentage"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_DebtDisclosureLineItems_7356dc78-7b99-475c-9d2a-d758215a64cc" xlink:to="loc_us-gaap_LineOfCreditFacilityCommitmentFeePercentage_4af79f32-5412-4ede-974b-674e96575c46" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtTerm_9983c513-83b7-4e9e-a107-228e84b88f45" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtTerm"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_DebtDisclosureLineItems_7356dc78-7b99-475c-9d2a-d758215a64cc" xlink:to="loc_us-gaap_LongTermDebtTerm_9983c513-83b7-4e9e-a107-228e84b88f45" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentInterestRateDuringPeriod_ff9c7953-81f2-49e7-8c63-700f082bc12a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentInterestRateDuringPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_DebtDisclosureLineItems_7356dc78-7b99-475c-9d2a-d758215a64cc" xlink:to="loc_us-gaap_DebtInstrumentInterestRateDuringPeriod_ff9c7953-81f2-49e7-8c63-700f082bc12a" xlink:type="arc" order="12"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebt_52a6236d-49eb-4432-b3b6-42928f3efe5d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebt"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_DebtDisclosureLineItems_7356dc78-7b99-475c-9d2a-d758215a64cc" xlink:to="loc_us-gaap_LongTermDebt_52a6236d-49eb-4432-b3b6-42928f3efe5d" xlink:type="arc" order="13"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentFaceAmount_d9f2922e-9692-4036-93fc-ad4ef86c475a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentFaceAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_DebtDisclosureLineItems_7356dc78-7b99-475c-9d2a-d758215a64cc" xlink:to="loc_us-gaap_DebtInstrumentFaceAmount_d9f2922e-9692-4036-93fc-ad4ef86c475a" xlink:type="arc" order="14"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentPeriodicPaymentPrincipal_ef884b57-6582-46be-aeb9-a8f494f0a9e2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentPeriodicPaymentPrincipal"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_DebtDisclosureLineItems_7356dc78-7b99-475c-9d2a-d758215a64cc" xlink:to="loc_us-gaap_DebtInstrumentPeriodicPaymentPrincipal_ef884b57-6582-46be-aeb9-a8f494f0a9e2" xlink:type="arc" order="15"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtPercentageBearingVariableInterestRate_8f6e68c2-fe92-466d-9865-83deb3df70c2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtPercentageBearingVariableInterestRate"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_DebtDisclosureLineItems_7356dc78-7b99-475c-9d2a-d758215a64cc" xlink:to="loc_us-gaap_LongTermDebtPercentageBearingVariableInterestRate_8f6e68c2-fe92-466d-9865-83deb3df70c2" xlink:type="arc" order="16"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.keytronic.com/role/SharebasedCompensationNarrativeDetails" xlink:type="simple" xlink:href="ktcc-20240330.xsd#SharebasedCompensationNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.keytronic.com/role/SharebasedCompensationNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_d988a1eb-3cc7-44eb-a4ee-7876638fa832" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_85bd8ccd-d4f5-42c4-95ef-8e9aa4bf3a5a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_d988a1eb-3cc7-44eb-a4ee-7876638fa832" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_85bd8ccd-d4f5-42c4-95ef-8e9aa4bf3a5a" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AwardTypeAxis_7f2ca53c-a1fc-444c-a253-6d905d3ba9dd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AwardTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_85bd8ccd-d4f5-42c4-95ef-8e9aa4bf3a5a" xlink:to="loc_us-gaap_AwardTypeAxis_7f2ca53c-a1fc-444c-a253-6d905d3ba9dd" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_7f2ca53c-a1fc-444c-a253-6d905d3ba9dd_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_7f2ca53c-a1fc-444c-a253-6d905d3ba9dd" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_7f2ca53c-a1fc-444c-a253-6d905d3ba9dd_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_a6b1b7df-c7ee-47c6-9f2a-6b2fc01d970a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_7f2ca53c-a1fc-444c-a253-6d905d3ba9dd" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_a6b1b7df-c7ee-47c6-9f2a-6b2fc01d970a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockAppreciationRightsSARSMember_ad207e77-bc9c-47ae-b3e2-601a899cbd20" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockAppreciationRightsSARSMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_a6b1b7df-c7ee-47c6-9f2a-6b2fc01d970a" xlink:to="loc_us-gaap_StockAppreciationRightsSARSMember_ad207e77-bc9c-47ae-b3e2-601a899cbd20" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_4ad2439c-78e8-4ca9-a58e-036f6cab9a19" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_d988a1eb-3cc7-44eb-a4ee-7876638fa832" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardAwardVestingPeriod1_4ad2439c-78e8-4ca9-a58e-036f6cab9a19" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod_9959302e-86ff-4662-b4b6-17b938f9df4e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_d988a1eb-3cc7-44eb-a4ee-7876638fa832" xlink:to="loc_us-gaap_SharebasedCompensationArrangementBySharebasedPaymentAwardExpirationPeriod_9959302e-86ff-4662-b4b6-17b938f9df4e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AllocatedShareBasedCompensationExpense_b327f258-996d-4506-b179-8709a069fe3f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AllocatedShareBasedCompensationExpense"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_d988a1eb-3cc7-44eb-a4ee-7876638fa832" xlink:to="loc_us-gaap_AllocatedShareBasedCompensationExpense_b327f258-996d-4506-b179-8709a069fe3f" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized_35ed3559-3524-480d-b181-8aff0074fe8b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_d988a1eb-3cc7-44eb-a4ee-7876638fa832" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognized_35ed3559-3524-480d-b181-8aff0074fe8b" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1_ac1bf03f-9672-4945-9edb-21592d20bbe9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_d988a1eb-3cc7-44eb-a4ee-7876638fa832" xlink:to="loc_us-gaap_EmployeeServiceShareBasedCompensationNonvestedAwardsTotalCompensationCostNotYetRecognizedPeriodForRecognition1_ac1bf03f-9672-4945-9edb-21592d20bbe9" xlink:type="arc" order="4"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.keytronic.com/role/SharebasedCompensationScheduleofSharebasedCompensationfortheAwardsGrantedDetails" xlink:type="simple" xlink:href="ktcc-20240330.xsd#SharebasedCompensationScheduleofSharebasedCompensationfortheAwardsGrantedDetails"/>
  <link:definitionLink xlink:role="http://www.keytronic.com/role/SharebasedCompensationScheduleofSharebasedCompensationfortheAwardsGrantedDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_93ec1490-41af-4309-9ad8-f419897a082f" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_3564d4c8-90aa-44af-bc8b-9c0f66c037a9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_93ec1490-41af-4309-9ad8-f419897a082f" xlink:to="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_3564d4c8-90aa-44af-bc8b-9c0f66c037a9" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AwardTypeAxis_f1df472d-18bc-4d8c-862e-84eb3b8c16e2" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AwardTypeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_ScheduleOfShareBasedCompensationArrangementsByShareBasedPaymentAwardTable_3564d4c8-90aa-44af-bc8b-9c0f66c037a9" xlink:to="loc_us-gaap_AwardTypeAxis_f1df472d-18bc-4d8c-862e-84eb3b8c16e2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_f1df472d-18bc-4d8c-862e-84eb3b8c16e2_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_AwardTypeAxis_f1df472d-18bc-4d8c-862e-84eb3b8c16e2" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_f1df472d-18bc-4d8c-862e-84eb3b8c16e2_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_be9cc8b5-ee80-41bc-920a-360f3aef8452" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_AwardTypeAxis_f1df472d-18bc-4d8c-862e-84eb3b8c16e2" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_be9cc8b5-ee80-41bc-920a-360f3aef8452" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_StockAppreciationRightsSARSMember_c944db09-c2df-4081-912e-5f5c380e6dc9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_StockAppreciationRightsSARSMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementsByShareBasedPaymentAwardAwardTypeAndPlanNameDomain_be9cc8b5-ee80-41bc-920a-360f3aef8452" xlink:to="loc_us-gaap_StockAppreciationRightsSARSMember_c944db09-c2df-4081-912e-5f5c380e6dc9" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_7de2c11a-c8cb-47c1-aa09-d44c975d9000" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_93ec1490-41af-4309-9ad8-f419897a082f" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriod_7de2c11a-c8cb-47c1-aa09-d44c975d9000" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedIntrinsicValue_e5a32770-b97d-45e2-bd82-c0f9208ff64d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedIntrinsicValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_93ec1490-41af-4309-9ad8-f419897a082f" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsNonvestedIntrinsicValue_e5a32770-b97d-45e2-bd82-c0f9208ff64d" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_e40de35f-395d-4cc5-838e-777a110ef1ab" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardLineItems_93ec1490-41af-4309-9ad8-f419897a082f" xlink:to="loc_us-gaap_ShareBasedCompensationArrangementByShareBasedPaymentAwardEquityInstrumentsOtherThanOptionsGrantsInPeriodWeightedAverageGrantDateFairValue_e40de35f-395d-4cc5-838e-777a110ef1ab" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.keytronic.com/role/DerivativeFinancialInstrumentsNarrativeDetails" xlink:type="simple" xlink:href="ktcc-20240330.xsd#DerivativeFinancialInstrumentsNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.keytronic.com/role/DerivativeFinancialInstrumentsNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLineItems_8a812acb-17eb-4320-9a9d-cdf0524b7724" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeTable_d4cd2b92-fc43-4f1f-afd2-64f365582425" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativeLineItems_8a812acb-17eb-4320-9a9d-cdf0524b7724" xlink:to="loc_us-gaap_DerivativeTable_d4cd2b92-fc43-4f1f-afd2-64f365582425" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_ae66f7d8-ee9a-489d-a651-f00e97dc2b0c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_d4cd2b92-fc43-4f1f-afd2-64f365582425" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_ae66f7d8-ee9a-489d-a651-f00e97dc2b0c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_ae66f7d8-ee9a-489d-a651-f00e97dc2b0c_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_ae66f7d8-ee9a-489d-a651-f00e97dc2b0c" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_ae66f7d8-ee9a-489d-a651-f00e97dc2b0c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_310e5013-f763-4ae1-988d-e157933b0044" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_ae66f7d8-ee9a-489d-a651-f00e97dc2b0c" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_310e5013-f763-4ae1-988d-e157933b0044" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ForeignExchangeContractMember_3eefb7fb-19dc-41ad-9b45-401e8c3162db" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ForeignExchangeContractMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_310e5013-f763-4ae1-988d-e157933b0044" xlink:to="loc_us-gaap_ForeignExchangeContractMember_3eefb7fb-19dc-41ad-9b45-401e8c3162db" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentAxis_e3d08469-8ac9-4ffa-b182-445bd3a35f5c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_d4cd2b92-fc43-4f1f-afd2-64f365582425" xlink:to="loc_us-gaap_DebtInstrumentAxis_e3d08469-8ac9-4ffa-b182-445bd3a35f5c" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_e3d08469-8ac9-4ffa-b182-445bd3a35f5c_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DebtInstrumentAxis_e3d08469-8ac9-4ffa-b182-445bd3a35f5c" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_e3d08469-8ac9-4ffa-b182-445bd3a35f5c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtInstrumentNameDomain_b98307a3-ec8d-441e-b4d1-277b6a880cc8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtInstrumentNameDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DebtInstrumentAxis_e3d08469-8ac9-4ffa-b182-445bd3a35f5c" xlink:to="loc_us-gaap_DebtInstrumentNameDomain_b98307a3-ec8d-441e-b4d1-277b6a880cc8" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_ktcc_EquipmentTermLoanMember_d539e7df-0699-46a1-b10f-29316b34a600" xlink:href="ktcc-20240330.xsd#ktcc_EquipmentTermLoanMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DebtInstrumentNameDomain_b98307a3-ec8d-441e-b4d1-277b6a880cc8" xlink:to="loc_ktcc_EquipmentTermLoanMember_d539e7df-0699-46a1-b10f-29316b34a600" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_ktcc_SettlementsOfForeignCurrencyExchangeForwardContracts_0e22ab35-2111-4ad5-a0bb-7183628aea1a" xlink:href="ktcc-20240330.xsd#ktcc_SettlementsOfForeignCurrencyExchangeForwardContracts"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_8a812acb-17eb-4320-9a9d-cdf0524b7724" xlink:to="loc_ktcc_SettlementsOfForeignCurrencyExchangeForwardContracts_0e22ab35-2111-4ad5-a0bb-7183628aea1a" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_ktcc_NotionalAmountOfForeignCurrencyForwardContracts_ab36eadb-51b0-4b34-b6b9-78f6b4469acc" xlink:href="ktcc-20240330.xsd#ktcc_NotionalAmountOfForeignCurrencyForwardContracts"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_8a812acb-17eb-4320-9a9d-cdf0524b7724" xlink:to="loc_ktcc_NotionalAmountOfForeignCurrencyForwardContracts_ab36eadb-51b0-4b34-b6b9-78f6b4469acc" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeNotionalAmount_7e83e5a2-f561-41cb-8275-02057f0aebd5" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeNotionalAmount"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_8a812acb-17eb-4320-9a9d-cdf0524b7724" xlink:to="loc_us-gaap_DerivativeNotionalAmount_7e83e5a2-f561-41cb-8275-02057f0aebd5" xlink:type="arc" order="2"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.keytronic.com/role/DerivativeFinancialInstrumentsScheduleofGainLossofDerivativeInstrumentsinStatementofOperationsDetails" xlink:type="simple" xlink:href="ktcc-20240330.xsd#DerivativeFinancialInstrumentsScheduleofGainLossofDerivativeInstrumentsinStatementofOperationsDetails"/>
  <link:definitionLink xlink:role="http://www.keytronic.com/role/DerivativeFinancialInstrumentsScheduleofGainLossofDerivativeInstrumentsinStatementofOperationsDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeLineItems_eec17bdf-30cd-42bf-a9f7-7e986744c0e8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeTable_d0152e0f-38c8-442a-8999-2ca6f444dd9e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DerivativeLineItems_eec17bdf-30cd-42bf-a9f7-7e986744c0e8" xlink:to="loc_us-gaap_DerivativeTable_d0152e0f-38c8-442a-8999-2ca6f444dd9e" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeInstrumentRiskAxis_ee65ec30-4e96-4c47-a19c-86e81ad2511c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeInstrumentRiskAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_d0152e0f-38c8-442a-8999-2ca6f444dd9e" xlink:to="loc_us-gaap_DerivativeInstrumentRiskAxis_ee65ec30-4e96-4c47-a19c-86e81ad2511c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_ee65ec30-4e96-4c47-a19c-86e81ad2511c_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_ee65ec30-4e96-4c47-a19c-86e81ad2511c" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_ee65ec30-4e96-4c47-a19c-86e81ad2511c_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DerivativeContractTypeDomain_f304ae67-4311-4891-9090-138beeed7396" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DerivativeContractTypeDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_DerivativeInstrumentRiskAxis_ee65ec30-4e96-4c47-a19c-86e81ad2511c" xlink:to="loc_us-gaap_DerivativeContractTypeDomain_f304ae67-4311-4891-9090-138beeed7396" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ForwardContractsMember_60031ee8-182f-48f2-8aee-312a998acb0c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ForwardContractsMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_f304ae67-4311-4891-9090-138beeed7396" xlink:to="loc_us-gaap_ForwardContractsMember_60031ee8-182f-48f2-8aee-312a998acb0c" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_InterestRateSwapMember_3dd29ba2-1204-4502-91c8-e530e730f2c1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_InterestRateSwapMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeContractTypeDomain_f304ae67-4311-4891-9090-138beeed7396" xlink:to="loc_us-gaap_InterestRateSwapMember_3dd29ba2-1204-4502-91c8-e530e730f2c1" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationAxis_e1693678-15a6-4464-934a-53ecb3ed69bd" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HedgingDesignationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DerivativeTable_d0152e0f-38c8-442a-8999-2ca6f444dd9e" xlink:to="loc_us-gaap_HedgingDesignationAxis_e1693678-15a6-4464-934a-53ecb3ed69bd" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationDomain_e1693678-15a6-4464-934a-53ecb3ed69bd_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HedgingDesignationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_HedgingDesignationAxis_e1693678-15a6-4464-934a-53ecb3ed69bd" xlink:to="loc_us-gaap_HedgingDesignationDomain_e1693678-15a6-4464-934a-53ecb3ed69bd_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_HedgingDesignationDomain_71d35d81-c6df-446e-a05e-ae7d8b3a4a28" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_HedgingDesignationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_HedgingDesignationAxis_e1693678-15a6-4464-934a-53ecb3ed69bd" xlink:to="loc_us-gaap_HedgingDesignationDomain_71d35d81-c6df-446e-a05e-ae7d8b3a4a28" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DesignatedAsHedgingInstrumentMember_50547d12-f739-4070-93b6-86011298b217" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DesignatedAsHedgingInstrumentMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_HedgingDesignationDomain_71d35d81-c6df-446e-a05e-ae7d8b3a4a28" xlink:to="loc_us-gaap_DesignatedAsHedgingInstrumentMember_50547d12-f739-4070-93b6-86011298b217" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TranslationAdjustmentForNetInvestmentHedgeRollForward_a1c08463-7428-459e-b62c-24fdefb38f03" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TranslationAdjustmentForNetInvestmentHedgeRollForward"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DerivativeLineItems_eec17bdf-30cd-42bf-a9f7-7e986744c0e8" xlink:to="loc_us-gaap_TranslationAdjustmentForNetInvestmentHedgeRollForward_a1c08463-7428-459e-b62c-24fdefb38f03" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_062f0aa5-8a1a-427b-bb93-8cedf80db184" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TranslationAdjustmentForNetInvestmentHedgeRollForward_a1c08463-7428-459e-b62c-24fdefb38f03" xlink:to="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_062f0aa5-8a1a-427b-bb93-8cedf80db184" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_8e4f7030-a7ea-4ffe-be23-942f1b136615" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TranslationAdjustmentForNetInvestmentHedgeRollForward_a1c08463-7428-459e-b62c-24fdefb38f03" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossBeforeReclassificationAfterTax_8e4f7030-a7ea-4ffe-be23-942f1b136615" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_6f2840d7-9517-40c7-bec6-bd916a4e8ff6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TranslationAdjustmentForNetInvestmentHedgeRollForward_a1c08463-7428-459e-b62c-24fdefb38f03" xlink:to="loc_us-gaap_OtherComprehensiveIncomeLossCashFlowHedgeGainLossReclassificationAfterTax_6f2840d7-9517-40c7-bec6-bd916a4e8ff6" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax_defec2f9-a1f6-48ef-b478-c81d0f883442" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_AccumulatedOtherComprehensiveIncomeLossNetOfTax"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.keytronic.com/role/RevenueScheduleofDisaggregationofRevenueDetails" xlink:type="simple" xlink:href="ktcc-20240330.xsd#RevenueScheduleofDisaggregationofRevenueDetails"/>
  <link:definitionLink xlink:role="http://www.keytronic.com/role/RevenueScheduleofDisaggregationofRevenueDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisaggregationOfRevenueLineItems_f94b2836-e655-4cc5-89fd-5f82c1390bbc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisaggregationOfRevenueLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DisaggregationOfRevenueTable_dab06e07-ad84-4eb1-a051-412df9dd4948" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DisaggregationOfRevenueTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_f94b2836-e655-4cc5-89fd-5f82c1390bbc" xlink:to="loc_us-gaap_DisaggregationOfRevenueTable_dab06e07-ad84-4eb1-a051-412df9dd4948" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TimingOfTransferOfGoodOrServiceAxis_8cbede46-ff96-4534-b68a-44bf622b17bc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TimingOfTransferOfGoodOrServiceAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_DisaggregationOfRevenueTable_dab06e07-ad84-4eb1-a051-412df9dd4948" xlink:to="loc_us-gaap_TimingOfTransferOfGoodOrServiceAxis_8cbede46-ff96-4534-b68a-44bf622b17bc" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TimingOfTransferOfGoodOrServiceDomain_8cbede46-ff96-4534-b68a-44bf622b17bc_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TimingOfTransferOfGoodOrServiceDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_TimingOfTransferOfGoodOrServiceAxis_8cbede46-ff96-4534-b68a-44bf622b17bc" xlink:to="loc_us-gaap_TimingOfTransferOfGoodOrServiceDomain_8cbede46-ff96-4534-b68a-44bf622b17bc_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TimingOfTransferOfGoodOrServiceDomain_1d82d253-2d29-4f73-9096-a4198c65398e" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TimingOfTransferOfGoodOrServiceDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_TimingOfTransferOfGoodOrServiceAxis_8cbede46-ff96-4534-b68a-44bf622b17bc" xlink:to="loc_us-gaap_TimingOfTransferOfGoodOrServiceDomain_1d82d253-2d29-4f73-9096-a4198c65398e" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransferredOverTimeMember_3a07332e-02a8-4644-a034-0869896dfedc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransferredOverTimeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TimingOfTransferOfGoodOrServiceDomain_1d82d253-2d29-4f73-9096-a4198c65398e" xlink:to="loc_us-gaap_TransferredOverTimeMember_3a07332e-02a8-4644-a034-0869896dfedc" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransferredAtPointInTimeMember_ec3339cd-d054-4a1d-bc92-b5180d16cd1b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransferredAtPointInTimeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TimingOfTransferOfGoodOrServiceDomain_1d82d253-2d29-4f73-9096-a4198c65398e" xlink:to="loc_us-gaap_TransferredAtPointInTimeMember_ec3339cd-d054-4a1d-bc92-b5180d16cd1b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_Revenues_bcdb268d-1892-4d32-a412-568f529850f3" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_Revenues"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_DisaggregationOfRevenueLineItems_f94b2836-e655-4cc5-89fd-5f82c1390bbc" xlink:to="loc_us-gaap_Revenues_bcdb268d-1892-4d32-a412-568f529850f3" xlink:type="arc" order="0"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.keytronic.com/role/LeasesNarrativeDetails" xlink:type="simple" xlink:href="ktcc-20240330.xsd#LeasesNarrativeDetails"/>
  <link:definitionLink xlink:role="http://www.keytronic.com/role/LeasesNarrativeDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeLeaseDescriptionLineItems_6369b9c2-cfd2-47c3-ad51-c64c790d42d6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeLeaseDescriptionLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeLeaseDescriptionTable_be4ce16a-f43e-43c8-acf3-c752ecac9df8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeLeaseDescriptionTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_6369b9c2-cfd2-47c3-ad51-c64c790d42d6" xlink:to="loc_us-gaap_LesseeLeaseDescriptionTable_be4ce16a-f43e-43c8-acf3-c752ecac9df8" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeAxis_0d7c5dc8-aa61-407d-a4f0-84623355a304" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LesseeLeaseDescriptionTable_be4ce16a-f43e-43c8-acf3-c752ecac9df8" xlink:to="loc_srt_RangeAxis_0d7c5dc8-aa61-407d-a4f0-84623355a304" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_0d7c5dc8-aa61-407d-a4f0-84623355a304_default" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_srt_RangeAxis_0d7c5dc8-aa61-407d-a4f0-84623355a304" xlink:to="loc_srt_RangeMember_0d7c5dc8-aa61-407d-a4f0-84623355a304_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_RangeMember_9deb9ca4-0e5f-4836-805e-ecbfc138c6b2" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_RangeMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_srt_RangeAxis_0d7c5dc8-aa61-407d-a4f0-84623355a304" xlink:to="loc_srt_RangeMember_9deb9ca4-0e5f-4836-805e-ecbfc138c6b2" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MinimumMember_80587851-b039-452a-a6b7-2d6a7fb62476" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MinimumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_9deb9ca4-0e5f-4836-805e-ecbfc138c6b2" xlink:to="loc_srt_MinimumMember_80587851-b039-452a-a6b7-2d6a7fb62476" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_srt_MaximumMember_07a903f1-1f42-4271-823c-231112aa7293" xlink:href="https://xbrl.fasb.org/srt/2023/elts/srt-2023.xsd#srt_MaximumMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_srt_RangeMember_9deb9ca4-0e5f-4836-805e-ecbfc138c6b2" xlink:to="loc_srt_MaximumMember_07a903f1-1f42-4271-823c-231112aa7293" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeOperatingLeaseTermOfContract_bc59fa59-d5d6-4d1b-bfce-c75d7cac37be" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeOperatingLeaseTermOfContract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_6369b9c2-cfd2-47c3-ad51-c64c790d42d6" xlink:to="loc_us-gaap_LesseeOperatingLeaseTermOfContract_bc59fa59-d5d6-4d1b-bfce-c75d7cac37be" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent_9a2d1a40-966b-4ca1-8add-9fcfddb2afec" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_6369b9c2-cfd2-47c3-ad51-c64c790d42d6" xlink:to="loc_us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent_9a2d1a40-966b-4ca1-8add-9fcfddb2afec" xlink:type="arc" order="1"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.keytronic.com/role/LeasesScheduleofLeaseCostDetails" xlink:type="simple" xlink:href="ktcc-20240330.xsd#LeasesScheduleofLeaseCostDetails"/>
  <link:definitionLink xlink:role="http://www.keytronic.com/role/LeasesScheduleofLeaseCostDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeLeaseDescriptionLineItems_538cd169-9023-4c20-9974-31ea2f9e79f4" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeLeaseDescriptionLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeLeaseDescriptionTable_5f30add4-d013-461b-a55d-18a335b6d8ff" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeLeaseDescriptionTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_538cd169-9023-4c20-9974-31ea2f9e79f4" xlink:to="loc_us-gaap_LesseeLeaseDescriptionTable_5f30add4-d013-461b-a55d-18a335b6d8ff" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationAxis_1d2eca13-9cc2-43a2-8ca9-ebe12b1c2ab7" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeStatementLocationAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LesseeLeaseDescriptionTable_5f30add4-d013-461b-a55d-18a335b6d8ff" xlink:to="loc_us-gaap_IncomeStatementLocationAxis_1d2eca13-9cc2-43a2-8ca9-ebe12b1c2ab7" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_1d2eca13-9cc2-43a2-8ca9-ebe12b1c2ab7_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeStatementLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_1d2eca13-9cc2-43a2-8ca9-ebe12b1c2ab7" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_1d2eca13-9cc2-43a2-8ca9-ebe12b1c2ab7_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_IncomeStatementLocationDomain_a6316e8e-d775-4fd8-a3b3-9386a183e24a" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_IncomeStatementLocationDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_IncomeStatementLocationAxis_1d2eca13-9cc2-43a2-8ca9-ebe12b1c2ab7" xlink:to="loc_us-gaap_IncomeStatementLocationDomain_a6316e8e-d775-4fd8-a3b3-9386a183e24a" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_CostOfSalesMember_838afc2d-2d58-4d34-a90c-4c86f95154ca" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_CostOfSalesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_a6316e8e-d775-4fd8-a3b3-9386a183e24a" xlink:to="loc_us-gaap_CostOfSalesMember_838afc2d-2d58-4d34-a90c-4c86f95154ca" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_SellingGeneralAndAdministrativeExpensesMember_33f9915f-f499-4472-b853-0e58fd533383" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_SellingGeneralAndAdministrativeExpensesMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_IncomeStatementLocationDomain_a6316e8e-d775-4fd8-a3b3-9386a183e24a" xlink:to="loc_us-gaap_SellingGeneralAndAdministrativeExpensesMember_33f9915f-f499-4472-b853-0e58fd533383" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseCost_2d37e261-80ad-4012-a470-382117fbf687" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_538cd169-9023-4c20-9974-31ea2f9e79f4" xlink:to="loc_us-gaap_OperatingLeaseCost_2d37e261-80ad-4012-a470-382117fbf687" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAssetAmortization_55d6c402-df69-4269-9232-7656f6b13aaa" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseRightOfUseAssetAmortization"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_538cd169-9023-4c20-9974-31ea2f9e79f4" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAssetAmortization_55d6c402-df69-4269-9232-7656f6b13aaa" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LeaseCost_5f12a6ef-e12b-43c7-838f-3cef89f7adff" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LeaseCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_538cd169-9023-4c20-9974-31ea2f9e79f4" xlink:to="loc_us-gaap_LeaseCost_5f12a6ef-e12b-43c7-838f-3cef89f7adff" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_VariableLeaseCost_4788833c-ff53-4cb0-a83e-23a7101768bc" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_VariableLeaseCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_538cd169-9023-4c20-9974-31ea2f9e79f4" xlink:to="loc_us-gaap_VariableLeaseCost_4788833c-ff53-4cb0-a83e-23a7101768bc" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_ShortTermLeaseCost_cddadecf-677f-49a5-87d1-330f0cd4234b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_ShortTermLeaseCost"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_538cd169-9023-4c20-9974-31ea2f9e79f4" xlink:to="loc_us-gaap_ShortTermLeaseCost_cddadecf-677f-49a5-87d1-330f0cd4234b" xlink:type="arc" order="4"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://www.keytronic.com/role/LeasesScheduleofLeaseAssetsandLiabilitiesDetails" xlink:type="simple" xlink:href="ktcc-20240330.xsd#LeasesScheduleofLeaseAssetsandLiabilitiesDetails"/>
  <link:definitionLink xlink:role="http://www.keytronic.com/role/LeasesScheduleofLeaseAssetsandLiabilitiesDetails" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeLeaseDescriptionLineItems_c969ecbe-d736-40ee-a166-76a134331a43" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeLeaseDescriptionLineItems"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LesseeLeaseDescriptionTable_d3c3b0b3-ad2c-402e-a7f2-e06c493bdc8c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LesseeLeaseDescriptionTable"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/all" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_c969ecbe-d736-40ee-a166-76a134331a43" xlink:to="loc_us-gaap_LesseeLeaseDescriptionTable_d3c3b0b3-ad2c-402e-a7f2-e06c493bdc8c" xlink:type="arc" order="1" xbrldt:closed="true" xbrldt:contextElement="segment"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinancialInstrumentAxis_0dbf275a-8abe-4832-b77a-14094b33a309" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinancialInstrumentAxis"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/hypercube-dimension" xlink:from="loc_us-gaap_LesseeLeaseDescriptionTable_d3c3b0b3-ad2c-402e-a7f2-e06c493bdc8c" xlink:to="loc_us-gaap_FinancialInstrumentAxis_0dbf275a-8abe-4832-b77a-14094b33a309" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_0dbf275a-8abe-4832-b77a-14094b33a309_default" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-default" xlink:from="loc_us-gaap_FinancialInstrumentAxis_0dbf275a-8abe-4832-b77a-14094b33a309" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_0dbf275a-8abe-4832-b77a-14094b33a309_default" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_5b80e529-e722-4f05-8d78-8e409665924c" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/dimension-domain" xlink:from="loc_us-gaap_FinancialInstrumentAxis_0dbf275a-8abe-4832-b77a-14094b33a309" xlink:to="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_5b80e529-e722-4f05-8d78-8e409665924c" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_DebtMember_070e7ab9-9059-46b0-9b30-011ad089e1e1" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_DebtMember"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_TransfersAndServicingOfFinancialInstrumentsTypesOfFinancialInstrumentsDomain_5b80e529-e722-4f05-8d78-8e409665924c" xlink:to="loc_us-gaap_DebtMember_070e7ab9-9059-46b0-9b30-011ad089e1e1" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_ktcc_OperatingLeasesAssetAndLiabilityAbstract_220780d4-96be-4236-967c-cebf7d0269c4" xlink:href="ktcc-20240330.xsd#ktcc_OperatingLeasesAssetAndLiabilityAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_c969ecbe-d736-40ee-a166-76a134331a43" xlink:to="loc_ktcc_OperatingLeasesAssetAndLiabilityAbstract_220780d4-96be-4236-967c-cebf7d0269c4" xlink:type="arc" order="0"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseRightOfUseAsset_34f5bf3d-24eb-4268-ab5f-705540589b9b" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseRightOfUseAsset"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_OperatingLeasesAssetAndLiabilityAbstract_220780d4-96be-4236-967c-cebf7d0269c4" xlink:to="loc_us-gaap_OperatingLeaseRightOfUseAsset_34f5bf3d-24eb-4268-ab5f-705540589b9b" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiability_42d272da-2c11-4def-ae56-7c501cf16f11" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseLiability"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_OperatingLeasesAssetAndLiabilityAbstract_220780d4-96be-4236-967c-cebf7d0269c4" xlink:to="loc_us-gaap_OperatingLeaseLiability_42d272da-2c11-4def-ae56-7c501cf16f11" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_ktcc_WeightedAverageRemainingOperatingLeaseTermAbstract_f80f7f11-a06e-42d0-be1a-5c1ef1ff8691" xlink:href="ktcc-20240330.xsd#ktcc_WeightedAverageRemainingOperatingLeaseTermAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_c969ecbe-d736-40ee-a166-76a134331a43" xlink:to="loc_ktcc_WeightedAverageRemainingOperatingLeaseTermAbstract_f80f7f11-a06e-42d0-be1a-5c1ef1ff8691" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseWeightedAverageRemainingLeaseTerm1_b0ab71ef-1d7c-46e9-a0be-4dbc8b6760a6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseWeightedAverageRemainingLeaseTerm1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_WeightedAverageRemainingOperatingLeaseTermAbstract_f80f7f11-a06e-42d0-be1a-5c1ef1ff8691" xlink:to="loc_us-gaap_OperatingLeaseWeightedAverageRemainingLeaseTerm1_b0ab71ef-1d7c-46e9-a0be-4dbc8b6760a6" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_ktcc_WeightedAverageOperatingLeasesDiscountRateAbstract_4f8af27a-ad64-44d3-be5e-3744fc97da4e" xlink:href="ktcc-20240330.xsd#ktcc_WeightedAverageOperatingLeasesDiscountRateAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_c969ecbe-d736-40ee-a166-76a134331a43" xlink:to="loc_ktcc_WeightedAverageOperatingLeasesDiscountRateAbstract_4f8af27a-ad64-44d3-be5e-3744fc97da4e" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent_adf0dab2-1a1f-4764-8040-383163763963" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_WeightedAverageOperatingLeasesDiscountRateAbstract_4f8af27a-ad64-44d3-be5e-3744fc97da4e" xlink:to="loc_us-gaap_OperatingLeaseWeightedAverageDiscountRatePercent_adf0dab2-1a1f-4764-8040-383163763963" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_ktcc_FinancingLeasesAssetAndLiabilityAbstract_666e11f5-4fa8-4c44-95a0-d14d0367f6ee" xlink:href="ktcc-20240330.xsd#ktcc_FinancingLeasesAssetAndLiabilityAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_c969ecbe-d736-40ee-a166-76a134331a43" xlink:to="loc_ktcc_FinancingLeasesAssetAndLiabilityAbstract_666e11f5-4fa8-4c44-95a0-d14d0367f6ee" xlink:type="arc" order="3"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseRightOfUseAsset_eb78d443-fa14-4d4c-92d5-8fb2397df660" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseRightOfUseAsset"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_FinancingLeasesAssetAndLiabilityAbstract_666e11f5-4fa8-4c44-95a0-d14d0367f6ee" xlink:to="loc_us-gaap_FinanceLeaseRightOfUseAsset_eb78d443-fa14-4d4c-92d5-8fb2397df660" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiability_8af5993b-53ae-43c7-9826-9d4cde045a2d" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseLiability"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_FinancingLeasesAssetAndLiabilityAbstract_666e11f5-4fa8-4c44-95a0-d14d0367f6ee" xlink:to="loc_us-gaap_FinanceLeaseLiability_8af5993b-53ae-43c7-9826-9d4cde045a2d" xlink:type="arc" order="2"/>
    <link:loc xlink:type="locator" xlink:label="loc_ktcc_WeightedAverageRemainingFinancingLeaseTermAbstract_6c64abe0-4a0c-4188-8ee5-22c8e0f283b1" xlink:href="ktcc-20240330.xsd#ktcc_WeightedAverageRemainingFinancingLeaseTermAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_c969ecbe-d736-40ee-a166-76a134331a43" xlink:to="loc_ktcc_WeightedAverageRemainingFinancingLeaseTermAbstract_6c64abe0-4a0c-4188-8ee5-22c8e0f283b1" xlink:type="arc" order="4"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseWeightedAverageRemainingLeaseTerm1_77841901-123d-4001-8eb7-7c11d8a9fe43" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseWeightedAverageRemainingLeaseTerm1"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_WeightedAverageRemainingFinancingLeaseTermAbstract_6c64abe0-4a0c-4188-8ee5-22c8e0f283b1" xlink:to="loc_us-gaap_FinanceLeaseWeightedAverageRemainingLeaseTerm1_77841901-123d-4001-8eb7-7c11d8a9fe43" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_ktcc_WeightedAverageFinancingLeasesDiscountRateAbstract_f538bb9f-2d5f-41d3-a765-8f133ba5add2" xlink:href="ktcc-20240330.xsd#ktcc_WeightedAverageFinancingLeasesDiscountRateAbstract"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_c969ecbe-d736-40ee-a166-76a134331a43" xlink:to="loc_ktcc_WeightedAverageFinancingLeasesDiscountRateAbstract_f538bb9f-2d5f-41d3-a765-8f133ba5add2" xlink:type="arc" order="5"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseWeightedAverageDiscountRatePercent_f0ed3fb1-20c7-42d4-ba22-5ca832174289" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseWeightedAverageDiscountRatePercent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_ktcc_WeightedAverageFinancingLeasesDiscountRateAbstract_f538bb9f-2d5f-41d3-a765-8f133ba5add2" xlink:to="loc_us-gaap_FinanceLeaseWeightedAverageDiscountRatePercent_f0ed3fb1-20c7-42d4-ba22-5ca832174289" xlink:type="arc" order="1"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityCurrent_add0334f-6934-4d78-8728-45e02ff2e172" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseLiabilityCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_c969ecbe-d736-40ee-a166-76a134331a43" xlink:to="loc_us-gaap_OperatingLeaseLiabilityCurrent_add0334f-6934-4d78-8728-45e02ff2e172" xlink:type="arc" order="6"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityStatementOfFinancialPositionExtensibleList_5dc0a4e8-c289-412e-8d8a-be0ee6574efb" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseLiabilityStatementOfFinancialPositionExtensibleList"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_c969ecbe-d736-40ee-a166-76a134331a43" xlink:to="loc_us-gaap_OperatingLeaseLiabilityStatementOfFinancialPositionExtensibleList_5dc0a4e8-c289-412e-8d8a-be0ee6574efb" xlink:type="arc" order="7"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_0699ab45-453e-460a-ac60-a235d15f5ee9" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseLiabilityNoncurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_c969ecbe-d736-40ee-a166-76a134331a43" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrent_0699ab45-453e-460a-ac60-a235d15f5ee9" xlink:type="arc" order="8"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_OperatingLeaseLiabilityNoncurrentStatementOfFinancialPositionExtensibleList_28dc4ff6-e180-4c87-be36-5d0b1cc00584" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_OperatingLeaseLiabilityNoncurrentStatementOfFinancialPositionExtensibleList"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_c969ecbe-d736-40ee-a166-76a134331a43" xlink:to="loc_us-gaap_OperatingLeaseLiabilityNoncurrentStatementOfFinancialPositionExtensibleList_28dc4ff6-e180-4c87-be36-5d0b1cc00584" xlink:type="arc" order="9"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityCurrent_5042280b-5deb-4365-8da7-1cf0259441e6" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseLiabilityCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_c969ecbe-d736-40ee-a166-76a134331a43" xlink:to="loc_us-gaap_FinanceLeaseLiabilityCurrent_5042280b-5deb-4365-8da7-1cf0259441e6" xlink:type="arc" order="10"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityCurrentStatementOfFinancialPositionExtensibleList_366e3024-0d94-47c8-80d7-ab6bcf907be8" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseLiabilityCurrentStatementOfFinancialPositionExtensibleList"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_c969ecbe-d736-40ee-a166-76a134331a43" xlink:to="loc_us-gaap_FinanceLeaseLiabilityCurrentStatementOfFinancialPositionExtensibleList_366e3024-0d94-47c8-80d7-ab6bcf907be8" xlink:type="arc" order="11"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_FinanceLeaseLiabilityNoncurrent_f38c903a-fec0-4b1f-b0dd-0aa41fed2758" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_FinanceLeaseLiabilityNoncurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LesseeLeaseDescriptionLineItems_c969ecbe-d736-40ee-a166-76a134331a43" xlink:to="loc_us-gaap_FinanceLeaseLiabilityNoncurrent_f38c903a-fec0-4b1f-b0dd-0aa41fed2758" xlink:type="arc" order="12"/>
  </link:definitionLink>
  <link:roleRef roleURI="http://fasb.org/us-gaap/role/eedm/ExtensibleEnumerationLists" xlink:type="simple" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-roles-2023.xsd#eedm"/>
  <link:definitionLink xlink:role="http://fasb.org/us-gaap/role/eedm/ExtensibleEnumerationLists" xlink:type="extended">
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LiabilitiesCurrentAbstract" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LiabilitiesCurrentAbstract"/>
    <link:loc xlink:type="locator" xlink:label="loc_us-gaap_LongTermDebtCurrent" xlink:href="https://xbrl.fasb.org/us-gaap/2023/elts/us-gaap-2023.xsd#us-gaap_LongTermDebtCurrent"/>
    <link:definitionArc xlink:arcrole="http://xbrl.org/int/dim/arcrole/domain-member" xlink:from="loc_us-gaap_LiabilitiesCurrentAbstract" xlink:to="loc_us-gaap_LongTermDebtCurrent" xlink:type="arc" order="1"/>
  </link:definitionLink>
</link:linkbase>
